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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 DCHECK(socket_); | 162 DCHECK(socket_); |
163 return socket_->Read(buf, buf_len, callback); | 163 return socket_->Read(buf, buf_len, callback); |
164 } | 164 } |
165 | 165 |
166 int UnixDomainClientSocket::Write(IOBuffer* buf, int buf_len, | 166 int UnixDomainClientSocket::Write(IOBuffer* buf, int buf_len, |
167 const CompletionCallback& callback) { | 167 const CompletionCallback& callback) { |
168 DCHECK(socket_); | 168 DCHECK(socket_); |
169 return socket_->Write(buf, buf_len, callback); | 169 return socket_->Write(buf, buf_len, callback); |
170 } | 170 } |
171 | 171 |
172 int UnixDomainClientSocket::SetReceiveBufferSize(int32 size) { | 172 int UnixDomainClientSocket::SetReceiveBufferSize(int32_t size) { |
173 NOTIMPLEMENTED(); | 173 NOTIMPLEMENTED(); |
174 return ERR_NOT_IMPLEMENTED; | 174 return ERR_NOT_IMPLEMENTED; |
175 } | 175 } |
176 | 176 |
177 int UnixDomainClientSocket::SetSendBufferSize(int32 size) { | 177 int UnixDomainClientSocket::SetSendBufferSize(int32_t size) { |
178 NOTIMPLEMENTED(); | 178 NOTIMPLEMENTED(); |
179 return ERR_NOT_IMPLEMENTED; | 179 return ERR_NOT_IMPLEMENTED; |
180 } | 180 } |
181 | 181 |
182 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { | 182 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { |
183 DCHECK(socket_); | 183 DCHECK(socket_); |
184 DCHECK(socket_->IsConnected()); | 184 DCHECK(socket_->IsConnected()); |
185 | 185 |
186 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); | 186 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); |
187 socket_.reset(); | 187 socket_.reset(); |
188 return socket_fd; | 188 return socket_fd; |
189 } | 189 } |
190 | 190 |
191 } // namespace net | 191 } // namespace net |
OLD | NEW |