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..fe6cbfc382574ae013c5b148e68f6f15d138b14b 100644 |
| --- a/net/socket/tcp_server_socket.h |
| +++ b/net/socket/tcp_server_socket.h |
| @@ -24,6 +24,17 @@ class NET_EXPORT TCPServerSocket : public ServerSocket { |
| TCPServerSocket(NetLog* net_log, const NetLogSource& source); |
| ~TCPServerSocket() override; |
| +#if defined(OS_POSIX) |
| + // Takes ownership of |socket_fd|, which is assumed to be already open, bound |
| + // and listening, potentially with a connection already waiting to be |
| + // accepted. This is used by headless chrome to allow a parent process to open |
| + // a port and listen on it, pass it to Chrome on launch to use as the devtools |
| + // remote debugging port, then connect to it immediately and block on the |
| + // first read rather than having to poll for the connection. See |
| + // crbug.com/624837. |
| + int AdopListeningRawSocket(int socket_fd); |
|
Jana
2017/04/17 17:27:57
Use "Adopt" instead of "Adop".
Raul Vera
2017/04/17 23:51:57
Oops. Thanks. Done.
|
| +#endif |
|
mmenke
2017/04/17 17:42:18
Why do we need a POSIX-only method? net/ is suppo
Raul Vera
2017/04/17 23:51:57
Because Windows does not inherit sockets the same
mmenke
2017/04/18 16:15:24
I don't think this is relevant to code in net/, wh
|
| + |
| // net::ServerSocket implementation. |
| int Listen(const IPEndPoint& address, int backlog) override; |
| int GetLocalAddress(IPEndPoint* address) const override; |