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

Unified Diff: runtime/bin/socket_win.cc

Issue 14766003: Add v6Only named argument to ServerSocket and etc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge 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
Index: runtime/bin/socket_win.cc
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index 12b76d8a1eeddd3dff76b0febe505129d50e1c6e..e8b0d4781a014f00a84648c53b83b51bb058652a 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -239,7 +239,8 @@ SocketAddresses* Socket::LookupAddress(const char* host,
intptr_t ServerSocket::CreateBindListen(RawAddr addr,
intptr_t port,
- intptr_t backlog) {
+ intptr_t backlog,
+ bool v6_only) {
SOCKET s = socket(addr.ss.ss_family, SOCK_STREAM, IPPROTO_TCP);
if (s == INVALID_SOCKET) {
return -1;
@@ -259,7 +260,7 @@ intptr_t ServerSocket::CreateBindListen(RawAddr addr,
}
if (addr.ss.ss_family == AF_INET6) {
- optval = false;
+ optval = v6_only;
setsockopt(s,
IPPROTO_IPV6,
IPV6_V6ONLY,

Powered by Google App Engine
This is Rietveld 408576698