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

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

Issue 925403002: Add the shared flag to HttpServer as well (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/http_impl.dart » ('j') | sdk/lib/io/secure_server_socket.dart » ('J')
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 d00f6298d6937ec07a1026f292867637fb7d69fa..ae2f7ff8cd49fe0ce03223c20aa071ea64320b9b 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -234,11 +234,21 @@ abstract class HttpServer implements Stream<HttpRequest> {
* 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.
+ *
+ * The optional argument [shared] specify whether additional binds
+ * to the same `address`, `port` and `v6Only` combination is
+ * possible from the same Dart process. If `shared` is `true` and
+ * additional binds are preformed, then the incoming (incoming)
kustermann 2015/02/17 11:30:55 preformed -> performed remove "(incoming)"? - al
Søren Gjesse 2015/02/17 12:53:10 Done.
+ * connections will be distributed between that set
kustermann 2015/02/17 11:30:56 that set -> that set of - also below
Søren Gjesse 2015/02/17 12:53:10 Done.
+ * `HttpServer`s. One way of using this is to have number of
+ * isolates between which incoming connections are distributed.
*/
kustermann 2015/02/17 11:30:56 Maybe also describe [v6Only] - also below
Søren Gjesse 2015/02/17 12:53:10 Done.
static Future<HttpServer> bind(address,
int port,
- {int backlog: 0})
- => _HttpServer.bind(address, port, backlog);
+ {int backlog: 0,
+ bool v6Only: false,
+ bool shared: false})
+ => _HttpServer.bind(address, port, backlog, v6Only, shared);
/**
* The [address] can either be a [String] or an
@@ -271,18 +281,30 @@ abstract class HttpServer implements Stream<HttpRequest> {
* is looked up in the certificate database, and is used as the server
* certificate. If [requestClientCertificate] is true, the server will
* request clients to authenticate with a client certificate.
+ *
+ * The optional argument [shared] specify whether additional binds
+ * to the same `address`, `port` and `v6Only` combination is
+ * possible from the same Dart process. If `shared` is `true` and
+ * additional binds are preformed, then the incoming (incoming)
+ * connections will be distributed between that set
+ * `HttpServer`s. One way of using this is to have number of
+ * isolates between which incoming connections are distributed.
*/
static Future<HttpServer> bindSecure(address,
int port,
{int backlog: 0,
+ bool v6Only: false,
String certificateName,
- bool requestClientCertificate: false})
+ bool requestClientCertificate: false,
+ bool shared: false})
=> _HttpServer.bindSecure(address,
port,
backlog,
+ v6Only,
certificateName,
- requestClientCertificate);
+ requestClientCertificate,
+ shared);
/**
* Attaches the HTTP server to an existing [ServerSocket]. When the
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | sdk/lib/io/secure_server_socket.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698