Chromium Code Reviews| Index: net/socket/tcp_server_socket.h |
| diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h |
| index 3b4a9616ede4bdbe921ab63f7f5a627ec70b1231..a4a5c05397ca84570546e8ee19e04c1a2379b18a 100644 |
| --- a/net/socket/tcp_server_socket.h |
| +++ b/net/socket/tcp_server_socket.h |
| @@ -11,6 +11,7 @@ |
| #include "net/base/ip_endpoint.h" |
| #include "net/base/net_export.h" |
| #include "net/socket/server_socket.h" |
| +#include "net/socket/socket_descriptor.h" |
| #include "net/socket/tcp_socket.h" |
| namespace net { |
| @@ -24,6 +25,11 @@ class NET_EXPORT TCPServerSocket : public ServerSocket { |
| TCPServerSocket(NetLog* net_log, const NetLogSource& source); |
| ~TCPServerSocket() override; |
| + // Takes ownership of |socket|, which has been opened, but may or may not be |
| + // bound or listening. The caller must determine this based on the provenance |
| + // of the socket and act accordingly. |
| + int AdoptUnconnectedSocket(SocketDescriptor socket); |
|
mmenke
2017/04/21 19:20:38
This works for connected sockets, too, right? May
Raul Vera
2017/05/01 05:35:25
It doesn't work for connected sockets, as the peer
|
| + |
| // net::ServerSocket implementation. |
| int Listen(const IPEndPoint& address, int backlog) override; |
| int GetLocalAddress(IPEndPoint* address) const override; |