| Index: net/socket/tcp_socket_posix.h
|
| diff --git a/net/socket/tcp_socket_posix.h b/net/socket/tcp_socket_posix.h
|
| index f5ba10abc34a5f00916dffc3792dccda996e063f..0274056d2e7d53d8113490c57837d73a578dce6f 100644
|
| --- a/net/socket/tcp_socket_posix.h
|
| +++ b/net/socket/tcp_socket_posix.h
|
| @@ -16,6 +16,7 @@
|
| #include "net/base/completion_callback.h"
|
| #include "net/base/net_export.h"
|
| #include "net/log/net_log_with_source.h"
|
| +#include "net/socket/socket_descriptor.h"
|
| #include "net/socket/socket_performance_watcher.h"
|
|
|
| namespace base {
|
| @@ -43,8 +44,15 @@ class NET_EXPORT TCPSocketPosix {
|
|
|
| int Open(AddressFamily family);
|
|
|
| - // Takes ownership of |socket_fd|.
|
| - int AdoptConnectedSocket(int socket_fd, const IPEndPoint& peer_address);
|
| + // Takes ownership of |socket|, which is known to already be connected to the
|
| + // given peer address. However, peer address may be the empty address, for
|
| + // compatibility. The given peer address will be returned by GetPeerAddress.
|
| + int AdoptConnectedSocket(SocketDescriptor socket,
|
| + const IPEndPoint& peer_address);
|
| + // Takes ownership of |socket|, which may or may not be open, bound, or
|
| + // listening. The caller must determine the state of the socket based on its
|
| + // provenance and act accordingly.
|
| + int AdoptUnconnectedSocket(SocketDescriptor socket);
|
|
|
| int Bind(const IPEndPoint& address);
|
|
|
|
|