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_CURVECP_CURVECP_CLIENT_SOCKET_H_ | 5 #ifndef NET_CURVECP_CURVECP_CLIENT_SOCKET_H_ |
6 #define NET_CURVECP_CURVECP_CLIENT_SOCKET_H_ | 6 #define NET_CURVECP_CURVECP_CLIENT_SOCKET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
10 #include "net/curvecp/client_packetizer.h" | 10 #include "net/curvecp/client_packetizer.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual void Disconnect(); | 29 virtual void Disconnect(); |
30 virtual bool IsConnected() const; | 30 virtual bool IsConnected() const; |
31 virtual bool IsConnectedAndIdle() const; | 31 virtual bool IsConnectedAndIdle() const; |
32 virtual int GetPeerAddress(AddressList* address) const; | 32 virtual int GetPeerAddress(AddressList* address) const; |
33 virtual int GetLocalAddress(IPEndPoint* address) const; | 33 virtual int GetLocalAddress(IPEndPoint* address) const; |
34 virtual const BoundNetLog& NetLog() const; | 34 virtual const BoundNetLog& NetLog() const; |
35 virtual void SetSubresourceSpeculation(); | 35 virtual void SetSubresourceSpeculation(); |
36 virtual void SetOmniboxSpeculation(); | 36 virtual void SetOmniboxSpeculation(); |
37 virtual bool WasEverUsed() const; | 37 virtual bool WasEverUsed() const; |
38 virtual bool UsingTCPFastOpen() const; | 38 virtual bool UsingTCPFastOpen() const; |
39 virtual int64 NumBytesRead() const; | |
40 virtual base::TimeDelta GetConnectTimeMicros() const; | |
41 | 39 |
42 // Socket methods: | 40 // Socket methods: |
43 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 41 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
44 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 42 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
45 virtual bool SetReceiveBufferSize(int32 size); | 43 virtual bool SetReceiveBufferSize(int32 size); |
46 virtual bool SetSendBufferSize(int32 size); | 44 virtual bool SetSendBufferSize(int32 size); |
47 | 45 |
48 private: | 46 private: |
49 AddressList addresses_; | 47 AddressList addresses_; |
50 BoundNetLog net_log_; | 48 BoundNetLog net_log_; |
51 Messenger messenger_; | 49 Messenger messenger_; |
52 ClientPacketizer packetizer_; | 50 ClientPacketizer packetizer_; |
53 | 51 |
54 DISALLOW_COPY_AND_ASSIGN(CurveCPClientSocket); | 52 DISALLOW_COPY_AND_ASSIGN(CurveCPClientSocket); |
55 }; | 53 }; |
56 | 54 |
57 } // namespace net | 55 } // namespace net |
58 | 56 |
59 #endif // NET_CURVECP_CURVECP_CLIENT_SOCKET_H_ | 57 #endif // NET_CURVECP_CURVECP_CLIENT_SOCKET_H_ |
OLD | NEW |