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..3edee1159d39f38cccbf637c6075ca8065718947 100644 |
--- a/net/socket/tcp_server_socket_libevent.h |
+++ b/net/socket/tcp_server_socket_libevent.h |
@@ -31,11 +31,17 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent |
virtual int Accept(scoped_ptr<StreamSocket>* socket, |
const CompletionCallback& callback) OVERRIDE; |
+ // Sets corresponding flags to allow the socket to share the local address to |
wtc
2012/09/13 18:31:55
Please make the following changes to tcp_server_so
justinlin
2012/09/14 03:54:40
Done. Also moved the comment to interface.
|
+ // which the socket will be bound with other processes. Should be called |
+ // before Bind(). |
+ void AllowAddressReuse(); |
+ |
// MessageLoopForIO::Watcher implementation. |
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; |
virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; |
private: |
+ int SetSocketOptions(); |
int AcceptInternal(scoped_ptr<StreamSocket>* socket); |
void Close(); |
@@ -46,6 +52,8 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent |
scoped_ptr<StreamSocket>* accept_socket_; |
CompletionCallback accept_callback_; |
+ bool reuse_address_; |
+ |
BoundNetLog net_log_; |
}; |