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

Side by Side Diff: net/socket/socks5_client_socket.cc

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/socks5_client_socket.h" 5 #include "net/socket/socks5_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 bool SOCKS5ClientSocket::WasEverUsed() const { 125 bool SOCKS5ClientSocket::WasEverUsed() const {
126 if (transport_.get() && transport_->socket()) { 126 if (transport_.get() && transport_->socket()) {
127 return transport_->socket()->WasEverUsed(); 127 return transport_->socket()->WasEverUsed();
128 } 128 }
129 NOTREACHED(); 129 NOTREACHED();
130 return false; 130 return false;
131 } 131 }
132 132
133 bool SOCKS5ClientSocket::UsingTCPFastOpen() const {
134 if (transport_.get() && transport_->socket()) {
135 return transport_->socket()->UsingTCPFastOpen();
136 }
137 NOTREACHED();
138 return false;
139 }
140
133 // Read is called by the transport layer above to read. This can only be done 141 // Read is called by the transport layer above to read. This can only be done
134 // if the SOCKS handshake is complete. 142 // if the SOCKS handshake is complete.
135 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len, 143 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
136 CompletionCallback* callback) { 144 CompletionCallback* callback) {
137 DCHECK(completed_handshake_); 145 DCHECK(completed_handshake_);
138 DCHECK_EQ(STATE_NONE, next_state_); 146 DCHECK_EQ(STATE_NONE, next_state_);
139 DCHECK(!user_callback_); 147 DCHECK(!user_callback_);
140 148
141 return transport_->socket()->Read(buf, buf_len, callback); 149 return transport_->socket()->Read(buf, buf_len, callback);
142 } 150 }
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 463
456 next_state_ = STATE_HANDSHAKE_READ; 464 next_state_ = STATE_HANDSHAKE_READ;
457 return OK; 465 return OK;
458 } 466 }
459 467
460 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { 468 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const {
461 return transport_->socket()->GetPeerAddress(address); 469 return transport_->socket()->GetPeerAddress(address);
462 } 470 }
463 471
464 } // namespace net 472 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698