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

Unified Diff: runtime/bin/socket_patch.dart

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 1515403a76c5972eb6a0c07e7f6b3fcc943739a9..1a3a6b66c5126ff13b9b4d7ce3e264e2260fdd50 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -3,9 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
patch class RawServerSocket {
- /* patch */ static Future<RawServerSocket> bind([address = "127.0.0.1",
- int port = 0,
- int backlog = 0]) {
+ /* patch */ static Future<RawServerSocket> bind(address,
+ int port,
+ {int backlog: 0}) {
+ if (address == null) address = InternetAddress.LOOPBACK_IP_V4;
Anders Johnsen 2013/05/01 07:50:19 No 'null' check - should not be null.
Søren Gjesse 2013/05/01 07:55:20 Done.
return _RawServerSocket.bind(address, port, backlog);
}
}
@@ -737,9 +738,9 @@ class _RawSocket extends Stream<RawSocketEvent>
patch class ServerSocket {
- /* patch */ static Future<ServerSocket> bind([address = "127.0.0.1",
- int port = 0,
- int backlog = 0]) {
+ /* patch */ static Future<ServerSocket> bind(address,
+ int port,
+ {int backlog: 0}) {
return _ServerSocket.bind(address, port, backlog);
}
}

Powered by Google App Engine
This is Rietveld 408576698