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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Multiple outstanding requests are not supported. | 65 // Multiple outstanding requests are not supported. |
66 // Full duplex mode (reading and writing at the same time) is supported. | 66 // Full duplex mode (reading and writing at the same time) is supported. |
67 int Read(IOBuffer* buf, | 67 int Read(IOBuffer* buf, |
68 int buf_len, | 68 int buf_len, |
69 const CompletionCallback& callback) override; | 69 const CompletionCallback& callback) override; |
70 int Write(IOBuffer* buf, | 70 int Write(IOBuffer* buf, |
71 int buf_len, | 71 int buf_len, |
72 const CompletionCallback& callback) override; | 72 const CompletionCallback& callback) override; |
73 int SetReceiveBufferSize(int32_t size) override; | 73 int SetReceiveBufferSize(int32_t size) override; |
74 int SetSendBufferSize(int32_t size) override; | 74 int SetSendBufferSize(int32_t size) override; |
| 75 int SetDoNotFragment(bool do_not_fragment) override; |
75 | 76 |
76 virtual bool SetKeepAlive(bool enable, int delay); | 77 virtual bool SetKeepAlive(bool enable, int delay); |
77 virtual bool SetNoDelay(bool no_delay); | 78 virtual bool SetNoDelay(bool no_delay); |
78 | 79 |
79 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 80 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
80 void ClearConnectionAttempts() override; | 81 void ClearConnectionAttempts() override; |
81 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; | 82 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
82 int64_t GetTotalReceivedBytes() const override; | 83 int64_t GetTotalReceivedBytes() const override; |
83 | 84 |
84 private: | 85 private: |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 147 |
147 // Total number of bytes received by the socket. | 148 // Total number of bytes received by the socket. |
148 int64_t total_received_bytes_; | 149 int64_t total_received_bytes_; |
149 | 150 |
150 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); | 151 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); |
151 }; | 152 }; |
152 | 153 |
153 } // namespace net | 154 } // namespace net |
154 | 155 |
155 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ | 156 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
OLD | NEW |