| 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 #ifndef NET_SOCKET_STREAM_SOCKET_H_ | 5 #ifndef NET_SOCKET_STREAM_SOCKET_H_ |
| 6 #define NET_SOCKET_STREAM_SOCKET_H_ | 6 #define NET_SOCKET_STREAM_SOCKET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual bool IsConnected() const = 0; | 50 virtual bool IsConnected() const = 0; |
| 51 | 51 |
| 52 // Called to test if the connection is still alive and idle. Returns false | 52 // Called to test if the connection is still alive and idle. Returns false |
| 53 // if a connection wasn't established, the connection is dead, or some data | 53 // if a connection wasn't established, the connection is dead, or some data |
| 54 // have been received. | 54 // have been received. |
| 55 virtual bool IsConnectedAndIdle() const = 0; | 55 virtual bool IsConnectedAndIdle() const = 0; |
| 56 | 56 |
| 57 // Copies the peer address to |address| and returns a network error code. | 57 // Copies the peer address to |address| and returns a network error code. |
| 58 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. | 58 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. |
| 59 // TODO(sergeyu): Use IPEndPoint instead of AddressList. | 59 // TODO(sergeyu): Use IPEndPoint instead of AddressList. |
| 60 virtual int GetPeerAddress(AddressList* address) const = 0; | 60 virtual int GetPeerAddress(IPEndPoint* address) const = 0; |
| 61 | 61 |
| 62 // Copies the local address to |address| and returns a network error code. | 62 // Copies the local address to |address| and returns a network error code. |
| 63 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. | 63 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. |
| 64 virtual int GetLocalAddress(IPEndPoint* address) const = 0; | 64 virtual int GetLocalAddress(IPEndPoint* address) const = 0; |
| 65 | 65 |
| 66 // Gets the NetLog for this socket. | 66 // Gets the NetLog for this socket. |
| 67 virtual const BoundNetLog& NetLog() const = 0; | 67 virtual const BoundNetLog& NetLog() const = 0; |
| 68 | 68 |
| 69 // Set the annotation to indicate this socket was created for speculative | 69 // Set the annotation to indicate this socket was created for speculative |
| 70 // reasons. This call is generally forwarded to a basic TCPClientSocket*, | 70 // reasons. This call is generally forwarded to a basic TCPClientSocket*, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // identify the motivation. | 130 // identify the motivation. |
| 131 bool omnibox_speculation_; | 131 bool omnibox_speculation_; |
| 132 bool subresource_speculation_; | 132 bool subresource_speculation_; |
| 133 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 133 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
| 134 }; | 134 }; |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace net | 137 } // namespace net |
| 138 | 138 |
| 139 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 139 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |