Skip to content

RawDatagramSocket.bind() reusePort is not supported under Windows #49598

Open
@sgrekhov

Description

@sgrekhov

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-documentationPrefer using 'type-documentation' and a specific area label.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions