sdk icon indicating copy to clipboard operation
sdk copied to clipboard

RawDatagramSocket.bind() reusePort is not supported under Windows

Open sgrekhov opened this issue 3 years ago • 0 comments

On Windows the following programm doesn't fail but prints an error message

import "dart:io";

main() async {
  await RawDatagramSocket.bind(InternetAddress.loopbackIPv4, 0, reusePort: true);
}

Output is

C:/dart-sdk/bin/dart.exe --enable-asserts test.dart
Dart Socket ERROR: ../../runtime/bin/socket_win.cc:194: `reusePort` not supported for Windows.
Process finished with exit code 0

Please add to RawDatagramSocket.bind() documentation that this parameter is not supported under Windows

Tested on Dart SDK version: 2.19.0-59.0.dev (dev) (Tue Aug 2 19:42:34 2022 -0700) on "windows_x64"

sgrekhov avatar Aug 05 '22 10:08 sgrekhov