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

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

Issue 13902009: Improve documentation on address for socket bind (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments 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
« no previous file with comments | « no previous file | sdk/lib/io/socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 21830f26ec60cbb2ca5d0f337c8f4d03f6b35e1a..bacd50e4e60cb407005958ab5b30c1511a09013e 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -62,10 +62,22 @@ abstract class HttpServer implements Stream<HttpRequest> {
// TODO(ajohnsen): Add HttpServer.secure.
/**
* Starts listening for HTTP requests on the specified [address] and
- * [port]. If a [port] of 0 is specified the server will choose an
- * ephemeral port. The optional argument [backlog] can be used to
- * specify the listen backlog for the underlying OS listen
- * setup.
+ * [port].
+ *
+ * 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.
+ *
+ * The optional argument [backlog] can be used to specify the listen
+ * backlog for the underlying OS listen setup. If [backlog] has the
+ * value of [:0:] (the default) a reasonable value will be chosen by
+ * the system.
*/
static Future<HttpServer> bind([String address = "127.0.0.1",
int port = 0,
« no previous file with comments | « no previous file | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698