diff --git a/lib/src/server/server.dart b/lib/src/server/server.dart index bc63077..630c0a2 100644 --- a/lib/src/server/server.dart +++ b/lib/src/server/server.dart @@ -88,18 +88,24 @@ class Server { {dynamic address, int port, ServerTlsCredentials security, - ServerSettings http2ServerSettings}) async { + ServerSettings http2ServerSettings, + int backlog: 0, + bool v6Only: false, + bool shared: false}) async { // TODO(dart-lang/grpc-dart#9): Handle HTTP/1.1 upgrade to h2c, if allowed. Stream server; if (security != null) { _secureServer = await SecureServerSocket.bind( address ?? InternetAddress.anyIPv4, port ?? 443, - security.securityContext); + security.securityContext, + backlog: backlog, + shared: shared, + v6Only: v6Only); server = _secureServer; } else { _insecureServer = await ServerSocket.bind( - address ?? InternetAddress.anyIPv4, port ?? 80); + address ?? InternetAddress.anyIPv4, port ?? 80, backlog: backlog, shared: shared , v6Only: v6Only); server = _insecureServer; } server.listen((socket) {