Index: net/socket/socket_libevent.h |
diff --git a/net/socket/socket_libevent.h b/net/socket/socket_libevent.h |
index 98eaf92de0c3afd8466e77aaccaedfd404245ecc..59509512bcac6021961267349d6c22580b30f7f0 100644 |
--- a/net/socket/socket_libevent.h |
+++ b/net/socket/socket_libevent.h |
@@ -23,7 +23,8 @@ class IPEndPoint; |
// Socket class to provide asynchronous read/write operations on top of the |
// posix socket api. It supports AF_INET, AF_INET6, and AF_UNIX addresses. |
-class SocketLibevent : public base::MessageLoopForIO::Watcher { |
+class NET_EXPORT_PRIVATE SocketLibevent |
+ : public base::MessageLoopForIO::Watcher { |
public: |
SocketLibevent(); |
virtual ~SocketLibevent(); |
@@ -34,6 +35,8 @@ class SocketLibevent : public base::MessageLoopForIO::Watcher { |
// Takes ownership of |socket|. |
int AdoptConnectedSocket(SocketDescriptor socket, |
const SockaddrStorage& peer_address); |
+ // Releases ownership of |socket_fd_| to caller. |
+ SocketDescriptor ReleaseConnectedSocket(); |
int Bind(const SockaddrStorage& address); |
@@ -93,6 +96,8 @@ class SocketLibevent : public base::MessageLoopForIO::Watcher { |
int DoWrite(IOBuffer* buf, int buf_len); |
void WriteCompleted(); |
+ void StopWatchingAndCleanUp(); |
+ |
SocketDescriptor socket_fd_; |
base::MessageLoopForIO::FileDescriptorWatcher accept_socket_watcher_; |