Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
| 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 | 89 |
| 90 // Helper used by Disconnect(), which disconnects minus resetting | 90 // Helper used by Disconnect(), which disconnects minus resetting |
| 91 // current_address_index_ and bind_address_. | 91 // current_address_index_ and bind_address_. |
| 92 void DoDisconnect(); | 92 void DoDisconnect(); |
| 93 | 93 |
| 94 void DidCompleteConnect(int result); | 94 void DidCompleteConnect(int result); |
| 95 void DidCompleteReadWrite(const CompletionCallback& callback, int result); | 95 void DidCompleteReadWrite(const CompletionCallback& callback, int result); |
| 96 | 96 |
| 97 int OpenSocket(AddressFamily family); | 97 int OpenSocket(AddressFamily family); |
| 98 | 98 |
| 99 void EmitTCPMetricsHistogramsOnSocketClose(); | |
|
mmenke
2015/07/07 19:53:49
Think this is worth a comment.
Bryan McQuade
2015/07/07 21:05:10
Done.
| |
| 100 | |
| 99 scoped_ptr<TCPSocket> socket_; | 101 scoped_ptr<TCPSocket> socket_; |
| 100 | 102 |
| 101 // Local IP address and port we are bound to. Set to NULL if Bind() | 103 // Local IP address and port we are bound to. Set to NULL if Bind() |
| 102 // wasn't called (in that case OS chooses address/port). | 104 // wasn't called (in that case OS chooses address/port). |
| 103 scoped_ptr<IPEndPoint> bind_address_; | 105 scoped_ptr<IPEndPoint> bind_address_; |
| 104 | 106 |
| 105 // The list of addresses we should try in order to establish a connection. | 107 // The list of addresses we should try in order to establish a connection. |
| 106 AddressList addresses_; | 108 AddressList addresses_; |
| 107 | 109 |
| 108 // Where we are in above list. Set to -1 if uninitialized. | 110 // Where we are in above list. Set to -1 if uninitialized. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 123 | 125 |
| 124 // Failed connection attempts made while trying to connect this socket. | 126 // Failed connection attempts made while trying to connect this socket. |
| 125 ConnectionAttempts connection_attempts_; | 127 ConnectionAttempts connection_attempts_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); | 129 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 } // namespace net | 132 } // namespace net |
| 131 | 133 |
| 132 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ | 134 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
| OLD | NEW |