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

Unified Diff: net/socket/tcp_server_socket_libevent.h

Issue 10907154: Allow server sockets to rebind to same port if there is nothing actively listening on that port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix content_unittests build Created 8 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 | « net/socket/server_socket.h ('k') | net/socket/tcp_server_socket_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_server_socket_libevent.h
diff --git a/net/socket/tcp_server_socket_libevent.h b/net/socket/tcp_server_socket_libevent.h
index 946cc50f949d56911d0a0a437a0c02b3dfd95165..3b8d71ecebb6e0d10bfb81aef564f213b7e5868c 100644
--- a/net/socket/tcp_server_socket_libevent.h
+++ b/net/socket/tcp_server_socket_libevent.h
@@ -26,6 +26,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent
virtual ~TCPServerSocketLibevent();
// net::ServerSocket implementation.
+ virtual void AllowAddressReuse() OVERRIDE;
virtual int Listen(const net::IPEndPoint& address, int backlog) OVERRIDE;
virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
virtual int Accept(scoped_ptr<StreamSocket>* socket,
@@ -36,6 +37,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent
virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
private:
+ int SetSocketOptions();
int AcceptInternal(scoped_ptr<StreamSocket>* socket);
void Close();
@@ -46,6 +48,8 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent
scoped_ptr<StreamSocket>* accept_socket_;
CompletionCallback accept_callback_;
+ bool reuse_address_;
+
BoundNetLog net_log_;
};
« no previous file with comments | « net/socket/server_socket.h ('k') | net/socket/tcp_server_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698