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

Side by Side Diff: net/socket/tcp_client_socket_win.h

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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/tcp_client_socket_libevent.cc ('k') | net/socket/tcp_client_socket_win.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <winsock2.h> 9 #include <winsock2.h>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual void SetOmniboxSpeculation(); 54 virtual void SetOmniboxSpeculation();
55 virtual bool WasEverUsed() const; 55 virtual bool WasEverUsed() const;
56 virtual bool UsingTCPFastOpen() const; 56 virtual bool UsingTCPFastOpen() const;
57 virtual int64 NumBytesRead() const; 57 virtual int64 NumBytesRead() const;
58 virtual base::TimeDelta GetConnectTimeMicros() const; 58 virtual base::TimeDelta GetConnectTimeMicros() const;
59 59
60 // Socket implementation. 60 // Socket implementation.
61 // Multiple outstanding requests are not supported. 61 // Multiple outstanding requests are not supported.
62 // Full duplex mode (reading and writing at the same time) is supported 62 // Full duplex mode (reading and writing at the same time) is supported
63 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); 63 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
64 virtual int Read(IOBuffer* buf, int buf_len,
65 const CompletionCallback& callback);
64 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ; 66 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ;
65 67
66 virtual bool SetReceiveBufferSize(int32 size); 68 virtual bool SetReceiveBufferSize(int32 size);
67 virtual bool SetSendBufferSize(int32 size); 69 virtual bool SetSendBufferSize(int32 size);
68 70
69 private: 71 private:
70 // State machine for connecting the socket. 72 // State machine for connecting the socket.
71 enum ConnectState { 73 enum ConnectState {
72 CONNECT_STATE_CONNECT, 74 CONNECT_STATE_CONNECT,
73 CONNECT_STATE_CONNECT_COMPLETE, 75 CONNECT_STATE_CONNECT_COMPLETE,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 base::TimeTicks connect_start_time_; 150 base::TimeTicks connect_start_time_;
149 base::TimeDelta connect_time_micros_; 151 base::TimeDelta connect_time_micros_;
150 int64 num_bytes_read_; 152 int64 num_bytes_read_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); 154 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin);
153 }; 155 };
154 156
155 } // namespace net 157 } // namespace net
156 158
157 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 159 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_libevent.cc ('k') | net/socket/tcp_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698