Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: net/socket/unix_domain_client_socket_posix.cc

Issue 509133002: Raw SocketDescriptor variant of UnixDomainServerSocket::Accept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ReleaseSocketDescriptor to UnixDomainClientSocket class Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/unix_domain_client_socket_posix.cc
diff --git a/net/socket/unix_domain_client_socket_posix.cc b/net/socket/unix_domain_client_socket_posix.cc
index 92fab6faa4189071fa01519c5825ff6b623f2307..6a6d5d8f4eaa584fa3b3b28c67aeaaf36da09ec8 100644
--- a/net/socket/unix_domain_client_socket_posix.cc
+++ b/net/socket/unix_domain_client_socket_posix.cc
@@ -159,4 +159,13 @@ int UnixDomainClientSocket::SetSendBufferSize(int32 size) {
return ERR_NOT_IMPLEMENTED;
}
+SocketDescriptor UnixDomainClientSocket::ReleaseSocketDescriptor() {
+ if (socket_) {
byungchul 2014/09/03 00:13:54 Fast return if !socket_
Chris Masone 2014/09/03 02:38:39 Done.
+ SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket();
+ socket_.reset();
+ return socket_fd;
+ }
+ return kInvalidSocket;
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698