| Index: sdk/lib/io/socket.dart
|
| diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
|
| index 6ad9592286edc65f4d407780e7cf3080dfd629f0..96fe33a247b8df1e87c683547566fb4efe87b2b8 100644
|
| --- a/sdk/lib/io/socket.dart
|
| +++ b/sdk/lib/io/socket.dart
|
| @@ -111,13 +111,18 @@ abstract class RawServerSocket implements Stream<RawSocket> {
|
| * completes the server socket is bound to the given [address] and
|
| * [port] and has started listening on it.
|
| *
|
| - * The default value for [address] is 127.0.0.1, which will allow
|
| - * only incoming connections from the local host. To allow for
|
| - * incoming connection from the network use either the value 0.0.0.0
|
| - * to bind to all interfaces or the IP address of a specific
|
| - * interface.
|
| + * The [address] can either be a [String] or an
|
| + * [InternetAddress]. If [address] is a [String], [bind] will
|
| + * perform a [InternetAddress.lookup] and use the first value in the
|
| + * list. To listen on the loopback adapter, which will allow only
|
| + * incoming connections from the local host, use the value
|
| + * [InternetAddress.LOOPBACK_IP_V4] or
|
| + * [InternetAddress.LOOPBACK_IP_V6]. To allow for incoming
|
| + * connection from the network use either one of the values
|
| + * [InternetAddress.ANY_IP_V4] or [InternetAddress.ANY_IP_V6] to
|
| + * bind to all interfaces or the IP address of a specific interface.
|
| *
|
| - * If [port] has the value [:0:] (the default) an ephemeral port will
|
| + * If [port] has the value [:0:] an ephemeral port will
|
| * be chosen by the system. The actual port used can be retrieved
|
| * using the [:port:] getter.
|
| *
|
| @@ -126,9 +131,9 @@ abstract class RawServerSocket implements Stream<RawSocket> {
|
| * value of [:0:] (the default) a reasonable value will be chosen by
|
| * the system.
|
| */
|
| - external static Future<RawServerSocket> bind([address = "127.0.0.1",
|
| - int port = 0,
|
| - int backlog = 0]);
|
| + external static Future<RawServerSocket> bind(address,
|
| + int port,
|
| + {int backlog: 0});
|
|
|
| /**
|
| * Returns the port used by this socket.
|
| @@ -154,24 +159,29 @@ abstract class ServerSocket implements Stream<Socket> {
|
| * completes the server socket is bound to the given [address] and
|
| * [port] and has started listening on it.
|
| *
|
| - * The default value for [address] is 127.0.0.1, which will allow
|
| - * only incoming connections from the local host. To allow for
|
| - * incoming connection from the network use either the value 0.0.0.0
|
| - * to bind to all interfaces or the IP address of a specific
|
| - * interface.
|
| + * The [address] can either be a [String] or an
|
| + * [InternetAddress]. If [address] is a [String], [bind] will
|
| + * perform a [InternetAddress.lookup] and use the first value in the
|
| + * list. To listen on the loopback adapter, which will allow only
|
| + * incoming connections from the local host, use the value
|
| + * [InternetAddress.LOOPBACK_IP_V4] or
|
| + * [InternetAddress.LOOPBACK_IP_V6]. To allow for incoming
|
| + * connection from the network use either one of the values
|
| + * [InternetAddress.ANY_IP_V4] or [InternetAddress.ANY_IP_V6] to
|
| + * bind to all interfaces or the IP address of a specific interface.
|
| *
|
| - * If [port] has the value [:0:] (the default) an ephemeral port will
|
| - * be chosen by the system. The actual port used can be retrieved
|
| - * using the [port] getter.
|
| + * If [port] has the value [:0:] an ephemeral port will be chosen by
|
| + * the system. The actual port used can be retrieved using the
|
| + * [port] getter.
|
| *
|
| * The optional argument [backlog] can be used to specify the listen
|
| * backlog for the underlying OS listen setup. If [backlog] has the
|
| * value of [:0:] (the default) a reasonable value will be chosen by
|
| * the system.
|
| */
|
| - external static Future<ServerSocket> bind([address = "127.0.0.1",
|
| - int port = 0,
|
| - int backlog = 0]);
|
| + external static Future<ServerSocket> bind(address,
|
| + int port,
|
| + {int backlog: 0});
|
|
|
| /**
|
| * Returns the port used by this socket.
|
|
|