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

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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_EXPORT to *PortOnAddressList. Created 8 years, 7 months 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
OLDNEW
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 #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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Local IP address and port we are bound to. Set to NULL if Bind() 106 // Local IP address and port we are bound to. Set to NULL if Bind()
107 // was't called (in that cases OS chooses address/port). 107 // was't called (in that cases OS chooses address/port).
108 scoped_ptr<IPEndPoint> bind_address_; 108 scoped_ptr<IPEndPoint> bind_address_;
109 109
110 // Stores bound socket between Bind() and Connect() calls. 110 // Stores bound socket between Bind() and Connect() calls.
111 SOCKET bound_socket_; 111 SOCKET bound_socket_;
112 112
113 // The list of addresses we should try in order to establish a connection. 113 // The list of addresses we should try in order to establish a connection.
114 AddressList addresses_; 114 AddressList addresses_;
115 115
116 // Where we are in above list, or NULL if all addrinfos have been tried. 116 // Where we are in above list. Set to -1 if uninitialized.
eroman 2012/05/04 01:08:41 Same comment as for the other socket file. I stron
117 const struct addrinfo* current_ai_; 117 size_t current_address_index_;
118 118
119 // The various states that the socket could be in. 119 // The various states that the socket could be in.
120 bool waiting_read_; 120 bool waiting_read_;
121 bool waiting_write_; 121 bool waiting_write_;
122 122
123 // The core of the socket that can live longer than the socket itself. We pass 123 // The core of the socket that can live longer than the socket itself. We pass
124 // resources to the Windows async IO functions and we have to make sure that 124 // resources to the Windows async IO functions and we have to make sure that
125 // they are not destroyed while the OS still references them. 125 // they are not destroyed while the OS still references them.
126 scoped_refptr<Core> core_; 126 scoped_refptr<Core> core_;
127 127
(...skipping 21 matching lines...) Expand all
149 base::TimeTicks connect_start_time_; 149 base::TimeTicks connect_start_time_;
150 base::TimeDelta connect_time_micros_; 150 base::TimeDelta connect_time_micros_;
151 int64 num_bytes_read_; 151 int64 num_bytes_read_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); 153 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin);
154 }; 154 };
155 155
156 } // namespace net 156 } // namespace net
157 157
158 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 158 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698