Index: net/base/listen_socket.h |
=================================================================== |
--- net/base/listen_socket.h (revision 80449) |
+++ net/base/listen_socket.h (working copy) |
@@ -12,6 +12,8 @@ |
#define NET_BASE_LISTEN_SOCKET_H_ |
#pragma once |
+#include <netinet/in.h> |
+ |
#include "build/build_config.h" |
#if defined(OS_WIN) |
@@ -56,6 +58,7 @@ |
const char* data, |
int len) = 0; |
virtual void DidClose(ListenSocket *sock) = 0; |
+ virtual int protocol() { return IPPROTO_TCP; } |
Mike Belshe
2011/04/06 18:32:53
nit: const function
|
}; |
// Listen on port for the specified IP address. Use 127.0.0.1 to only |
@@ -88,7 +91,7 @@ |
ListenSocket(SOCKET s, ListenSocketDelegate* del); |
virtual ~ListenSocket(); |
- static SOCKET Listen(std::string ip, int port); |
+ static SOCKET Listen(std::string ip, int port, int protocol); |
// if valid, returned SOCKET is non-blocking |
static SOCKET Accept(SOCKET s); |