OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/socket/unix_domain_client_socket_posix.h" | 5 #include "net/socket/unix_domain_client_socket_posix.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/un.h> | 8 #include <sys/un.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 int UnixDomainClientSocket::SetReceiveBufferSize(int32 size) { | 152 int UnixDomainClientSocket::SetReceiveBufferSize(int32 size) { |
153 NOTIMPLEMENTED(); | 153 NOTIMPLEMENTED(); |
154 return ERR_NOT_IMPLEMENTED; | 154 return ERR_NOT_IMPLEMENTED; |
155 } | 155 } |
156 | 156 |
157 int UnixDomainClientSocket::SetSendBufferSize(int32 size) { | 157 int UnixDomainClientSocket::SetSendBufferSize(int32 size) { |
158 NOTIMPLEMENTED(); | 158 NOTIMPLEMENTED(); |
159 return ERR_NOT_IMPLEMENTED; | 159 return ERR_NOT_IMPLEMENTED; |
160 } | 160 } |
161 | 161 |
162 SocketDescriptor UnixDomainClientSocket::ReleaseSocketDescriptor() { | |
163 if (socket_) { | |
byungchul
2014/09/03 00:13:54
Fast return if !socket_
Chris Masone
2014/09/03 02:38:39
Done.
| |
164 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); | |
165 socket_.reset(); | |
166 return socket_fd; | |
167 } | |
168 return kInvalidSocket; | |
169 } | |
170 | |
162 } // namespace net | 171 } // namespace net |
OLD | NEW |