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

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

Issue 13902009: Improve documentation on address for socket bind (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
« sdk/lib/io/http.dart ('K') | « sdk/lib/io/http.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/socket.dart
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index 48c864064f295f6c3bd1cb12ba3b6f322a3c8be8..6027a9ab65e730679eb5340d4ecfb5ec9da9e23a 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -16,6 +16,12 @@ 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.
+ *
* 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.
@@ -51,6 +57,12 @@ 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.
+ *
* 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.
« sdk/lib/io/http.dart ('K') | « sdk/lib/io/http.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698