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

Unified Diff: runtime/bin/socket.cc

Issue 25511002: Add reusePort argument to ServerSocket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Mac os X version. Created 7 years, 3 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 | « runtime/bin/socket.h ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 4dfbe503fa750f586c45091acb6e6cc59950c660..02fa3921af1058c4a985796fdac19a57c5120ac1 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -302,14 +302,16 @@ void FUNCTION_NAME(ServerSocket_CreateBindListen)(Dart_NativeArguments args) {
Dart_Handle port_obj = Dart_GetNativeArgument(args, 2);
Dart_Handle backlog_obj = Dart_GetNativeArgument(args, 3);
Dart_Handle v6_only_obj = Dart_GetNativeArgument(args, 4);
+ Dart_Handle reuse_port_obj = Dart_GetNativeArgument(args, 5);
bool v6_only = DartUtils::GetBooleanValue(v6_only_obj);
+ bool reuse_port = DartUtils::GetBooleanValue(reuse_port_obj);
int64_t port = 0;
int64_t backlog = 0;
if (!Dart_IsError(result) &&
DartUtils::GetInt64Value(port_obj, &port) &&
DartUtils::GetInt64Value(backlog_obj, &backlog)) {
intptr_t socket = ServerSocket::CreateBindListen(
- addr, port, backlog, v6_only);
+ addr, port, backlog, v6_only, reuse_port);
OSError error;
Dart_TypedDataReleaseData(host_obj);
if (socket >= 0) {
« no previous file with comments | « runtime/bin/socket.h ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698