Chromium Code Reviews| Index: sdk/lib/io/socket.dart |
| diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart |
| index bb39cd60c6f7d231a656f2e9ce14dff1882b8149..a6193d17b927c58ede94e55e5b50b2b1b926108d 100644 |
| --- a/sdk/lib/io/socket.dart |
| +++ b/sdk/lib/io/socket.dart |
| @@ -424,8 +424,14 @@ abstract class RawSocket implements Stream<RawSocketEvent> { |
| * address to bind when making the connection. `sourceAddress` can either |
| * be a `String` or an `InternetAddress`. If a `String` is passed it must |
| * hold a numeric IP address. |
| + * |
| + * The argument [timeout] is used to specify the maximum allowed time to wait |
| + * for a connection to be established. If [timeout] is longer than the system |
| + * level timeout duration, a timeout may occur sooner than specified in |
| + * [timeout]. |
|
zra
2017/06/21 20:32:31
Say what happens when there is a timeout.
bkonyi
2017/06/21 21:20:04
Done.
|
| */ |
| - external static Future<RawSocket> connect(host, int port, {sourceAddress}); |
| + external static Future<RawSocket> connect(host, int port, |
| + {sourceAddress, Duration timeout}); |
| /** |
| * Returns the number of received and non-read bytes in the socket that |
| @@ -522,8 +528,14 @@ abstract class Socket implements Stream<List<int>>, IOSink { |
| * address to bind when making the connection. `sourceAddress` can either |
| * be a `String` or an `InternetAddress`. If a `String` is passed it must |
| * hold a numeric IP address. |
| + * |
| + * The argument [timeout] is used to specify the maximum allowed time to wait |
|
zra
2017/06/21 20:32:32
ditto
bkonyi
2017/06/21 21:20:04
Done.
|
| + * for a connection to be established. If [timeout] is longer than the system |
| + * level timeout duration, a timeout may occur sooner than specified in |
| + * [timeout]. |
| */ |
| - external static Future<Socket> connect(host, int port, {sourceAddress}); |
| + external static Future<Socket> connect(host, int port, |
| + {sourceAddress, Duration timeout}); |
| /** |
| * Destroy the socket in both directions. Calling [destroy] will make the |