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

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: Fix usage of Close(), add a read() to unittest 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..5adbca9979e21513886fa8123c9935d566b0bcc1 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::ReleaseConnectedSocket() {
+ DCHECK(socket_);
+ DCHECK(socket_->IsConnected());
+
+ SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket();
+ socket_.reset();
+ return socket_fd;
+}
+
} // namespace net
« no previous file with comments | « net/socket/unix_domain_client_socket_posix.h ('k') | net/socket/unix_domain_client_socket_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698