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

Unified Diff: net/base/listen_socket.cc

Issue 6800009: Attn: Mike Belshe Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 9 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: net/base/listen_socket.cc
===================================================================
--- net/base/listen_socket.cc (revision 80449)
+++ net/base/listen_socket.cc (working copy)
@@ -46,7 +46,7 @@
ListenSocket* ListenSocket::Listen(std::string ip, int port,
ListenSocketDelegate* del) {
- SOCKET s = Listen(ip, port);
+ SOCKET s = Listen(ip, port, del->protocol());
if (s == kInvalidSocket) {
// TODO(erikkay): error handling
} else {
@@ -104,8 +104,8 @@
CloseSocket(socket_);
}
-SOCKET ListenSocket::Listen(std::string ip, int port) {
- SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+SOCKET ListenSocket::Listen(std::string ip, int port, int protocol) {
+ SOCKET s = socket(AF_INET, SOCK_STREAM, protocol);
if (s != kInvalidSocket) {
#if defined(OS_POSIX)
// Allow rapid reuse.

Powered by Google App Engine
This is Rietveld 408576698