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

Unified Diff: net/base/listen_socket.h

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.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);

Powered by Google App Engine
This is Rietveld 408576698