Chromium Code Reviews| Index: sdk/lib/io/socket.dart |
| diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart |
| index c5eb054109a2b59d1b5934847f4952608748e944..a31b5bbe4cabb08f50a5b17afb39fb48d98453a1 100644 |
| --- a/sdk/lib/io/socket.dart |
| +++ b/sdk/lib/io/socket.dart |
| @@ -4,6 +4,21 @@ |
| part of dart.io; |
| + |
| +class InternetAddressType { |
| + static const InternetAddressType IPv4 = const InternetAddressType._("IPv4"); |
| + static const InternetAddressType IPv6 = const InternetAddressType._("IPv6"); |
|
Søren Gjesse
2013/04/18 09:07:40
Change this to an integer with the same values as
Anders Johnsen
2013/04/18 12:09:45
Done.
|
| + final String name; |
| + const InternetAddressType._(String this.name); |
|
Søren Gjesse
2013/04/18 09:07:40
Please ass toString as well.
Anders Johnsen
2013/04/18 12:09:45
Done.
|
| +} |
| + |
| +abstract class InternetAddress { |
| + InternetAddressType type; |
| + String get address; |
| + |
| + external static Future<List<InternetAddress>> lookup(String host); |
| +} |
| + |
| /** |
| * The RawServerSocket is a server socket, providing a stream of low-level |
| * [RawSocket]s. |
| @@ -145,7 +160,7 @@ abstract class RawSocket implements Stream<RawSocketEvent> { |
| * that will complete with either a [RawSocket] once connected or an error |
| * if the host-lookup or connection failed. |
|
Søren Gjesse
2013/04/18 09:07:40
Update comment on type of host.
Anders Johnsen
2013/04/18 12:09:45
Done.
|
| */ |
| - external static Future<RawSocket> connect(String host, int port); |
| + external static Future<RawSocket> connect(host, int port); |
| /** |
| * Returns the number of received and non-read bytes in the socket that |
| @@ -234,7 +249,7 @@ abstract class Socket implements Stream<List<int>>, IOSink { |
| * that will complete with either a [Socket] once connected or an error |
| * if the host-lookup or connection failed. |
|
Søren Gjesse
2013/04/18 09:07:40
Ditto.
Anders Johnsen
2013/04/18 12:09:45
Done.
|
| */ |
| - external static Future<Socket> connect(String host, int port); |
| + external static Future<Socket> connect(host, int port); |
| /** |
| * Destroy the socket in both directions. Calling [destroy] will make the |