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

Unified Diff: lib/http_multi_server.dart

Issue 1508203004: Update loopback constructors to match dart:io. (Closed) Base URL: git@github.com:dart-lang/http_multi_server@master
Patch Set: Created 5 years 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/http_multi_server.dart
diff --git a/lib/http_multi_server.dart b/lib/http_multi_server.dart
index abad76ebb9b163910e9b92ad208f48b16185a90c..12b6e4069eefaa53f9061b9f8ecc75f887f61224 100644
--- a/lib/http_multi_server.dart
+++ b/lib/http_multi_server.dart
@@ -93,33 +93,27 @@ class HttpMultiServer extends StreamView<HttpRequest> implements HttpServer {
/// Creates an [HttpServer] listening on all available loopback addresses for
/// this computer.
///
- /// If this computer supports both IPv4 and IPv6, this returns an
- /// [HttpMultiServer] listening to [port] on both loopback addresses.
- /// Otherwise, it returns a normal [HttpServer] listening only on the IPv4
- /// address.
- ///
- /// If [port] is 0, the same ephemeral port is used for both the IPv4 and IPv6
- /// addresses.
- static Future<HttpServer> loopback(int port, {int backlog}) {
+ /// See [HttpServer.bind].
+ static Future<HttpServer> loopback(int port, {int backlog, bool v6Only: false,
+ bool shared: false}) {
if (backlog == null) backlog = 0;
return _loopback(port, (address, port) =>
- HttpServer.bind(address, port, backlog: backlog));
+ HttpServer.bind(address, port,
+ backlog: backlog, v6Only: v6Only, shared: shared));
}
/// Like [loopback], but supports HTTPS requests.
///
- /// The certificate with nickname or distinguished name (DN) [certificateName]
- /// 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.
- static Future<HttpServer> loopbackSecure(int port, {int backlog,
- String certificateName, bool requestClientCertificate: false}) {
+ /// See [HttpServer.bindSecure].
+ static Future<HttpServer> loopbackSecure(int port, SecurityContext context,
+ {int backlog, bool v6Only: false, bool requestClientCertificate: false,
+ bool shared: false}) {
if (backlog == null) backlog = 0;
return _loopback(port, (address, port) =>
- HttpServer.bindSecure(address, port, backlog: backlog,
- certificateName: certificateName,
+ HttpServer.bindSecure(address, port, context,
+ backlog: backlog, v6Only: v6Only, shared: shared,
requestClientCertificate: requestClientCertificate));
}
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698