OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/socks_client_socket.h" | 5 #include "net/socket/socks_client_socket.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 | 212 |
213 int SOCKSClientSocket::SetReceiveBufferSize(int32_t size) { | 213 int SOCKSClientSocket::SetReceiveBufferSize(int32_t size) { |
214 return transport_->socket()->SetReceiveBufferSize(size); | 214 return transport_->socket()->SetReceiveBufferSize(size); |
215 } | 215 } |
216 | 216 |
217 int SOCKSClientSocket::SetSendBufferSize(int32_t size) { | 217 int SOCKSClientSocket::SetSendBufferSize(int32_t size) { |
218 return transport_->socket()->SetSendBufferSize(size); | 218 return transport_->socket()->SetSendBufferSize(size); |
219 } | 219 } |
220 | 220 |
| 221 int SOCKSClientSocket::SetDoNotFragment(bool do_not_fragment) { |
| 222 return transport_->socket()->SetDoNotFragment(do_not_fragment); |
| 223 } |
| 224 |
221 void SOCKSClientSocket::DoCallback(int result) { | 225 void SOCKSClientSocket::DoCallback(int result) { |
222 DCHECK_NE(ERR_IO_PENDING, result); | 226 DCHECK_NE(ERR_IO_PENDING, result); |
223 DCHECK(!user_callback_.is_null()); | 227 DCHECK(!user_callback_.is_null()); |
224 | 228 |
225 // Since Run() may result in Read being called, | 229 // Since Run() may result in Read being called, |
226 // clear user_callback_ up front. | 230 // clear user_callback_ up front. |
227 DVLOG(1) << "Finished setting up SOCKS handshake"; | 231 DVLOG(1) << "Finished setting up SOCKS handshake"; |
228 base::ResetAndReturn(&user_callback_).Run(result); | 232 base::ResetAndReturn(&user_callback_).Run(result); |
229 } | 233 } |
230 | 234 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 450 |
447 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const { | 451 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const { |
448 return transport_->socket()->GetPeerAddress(address); | 452 return transport_->socket()->GetPeerAddress(address); |
449 } | 453 } |
450 | 454 |
451 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { | 455 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { |
452 return transport_->socket()->GetLocalAddress(address); | 456 return transport_->socket()->GetLocalAddress(address); |
453 } | 457 } |
454 | 458 |
455 } // namespace net | 459 } // namespace net |
OLD | NEW |