Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: sdk/lib/io/socket.dart

Issue 14766003: Add v6Only named argument to ServerSocket and etc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/io/socket.dart
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index c32d5a83f6bab8b2db1f5482bf72fca0d8d2a9b3..9cf1017a116cb57078ee6ed27450fbae4c37235d 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -125,7 +125,7 @@ abstract class RawServerSocket implements Stream<RawSocket> {
*
* If an IP version 6 (IPv6) address is used, both IP version 6
* (IPv6) and version 4 (IPv4) connections will be accepted. To
- * restrict this to version 6 (IPv6) only, use [setOption] to set
+ * restrict this to version 6 (IPv6) only, use [v6Only] to set
* version 6 only.
*
* If [port] has the value [:0:] an ephemeral port will
@@ -139,7 +139,8 @@ abstract class RawServerSocket implements Stream<RawSocket> {
*/
external static Future<RawServerSocket> bind(address,
int port,
- {int backlog: 0});
+ {int backlog: 0,
+ bool v6Only: false});
/**
* Returns the port used by this socket.
@@ -179,7 +180,7 @@ abstract class ServerSocket implements Stream<Socket> {
*
* If an IP version 6 (IPv6) address is used, both IP version 6
* (IPv6) and version 4 (IPv4) connections will be accepted. To
- * restrict this to version 6 (IPv6) only, use [setOption] to set
+ * restrict this to version 6 (IPv6) only, use [v6Only] to set
* version 6 only.
*
* If [port] has the value [:0:] an ephemeral port will be chosen by
@@ -193,7 +194,8 @@ abstract class ServerSocket implements Stream<Socket> {
*/
external static Future<ServerSocket> bind(address,
int port,
- {int backlog: 0});
+ {int backlog: 0,
+ bool v6Only: false});
/**
* Returns the port used by this socket.
@@ -232,6 +234,7 @@ class SocketOption {
* TCP_NODELAY is disabled by default.
*/
static const SocketOption TCP_NODELAY = const SocketOption._(0);
+
const SocketOption._(this._value);
final _value;
}

Powered by Google App Engine
This is Rietveld 408576698