| 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 "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 #include "net/log/net_log.h" | 16 #include "net/log/net_log.h" |
| 17 #include "net/socket/connection_attempts.h" | 17 #include "net/socket/connection_attempts.h" |
| 18 #include "net/socket/stream_socket.h" | 18 #include "net/socket/stream_socket.h" |
| 19 #include "net/socket/tcp_socket.h" | 19 #include "net/socket/tcp_socket.h" |
| 20 | 20 |
| 21 namespace net { | 21 namespace net { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Socket implementation. | 60 // Socket implementation. |
| 61 // Multiple outstanding requests are not supported. | 61 // Multiple outstanding requests are not supported. |
| 62 // Full duplex mode (reading and writing at the same time) is supported. | 62 // Full duplex mode (reading and writing at the same time) is supported. |
| 63 int Read(IOBuffer* buf, | 63 int Read(IOBuffer* buf, |
| 64 int buf_len, | 64 int buf_len, |
| 65 const CompletionCallback& callback) override; | 65 const CompletionCallback& callback) override; |
| 66 int Write(IOBuffer* buf, | 66 int Write(IOBuffer* buf, |
| 67 int buf_len, | 67 int buf_len, |
| 68 const CompletionCallback& callback) override; | 68 const CompletionCallback& callback) override; |
| 69 int SetReceiveBufferSize(int32 size) override; | 69 int SetReceiveBufferSize(int32_t size) override; |
| 70 int SetSendBufferSize(int32 size) override; | 70 int SetSendBufferSize(int32_t size) override; |
| 71 | 71 |
| 72 virtual bool SetKeepAlive(bool enable, int delay); | 72 virtual bool SetKeepAlive(bool enable, int delay); |
| 73 virtual bool SetNoDelay(bool no_delay); | 73 virtual bool SetNoDelay(bool no_delay); |
| 74 | 74 |
| 75 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 75 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 76 void ClearConnectionAttempts() override; | 76 void ClearConnectionAttempts() override; |
| 77 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; | 77 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
| 78 int64_t GetTotalReceivedBytes() const override; | 78 int64_t GetTotalReceivedBytes() const override; |
| 79 | 79 |
| 80 private: | 80 private: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Total number of bytes received by the socket. | 136 // Total number of bytes received by the socket. |
| 137 int64_t total_received_bytes_; | 137 int64_t total_received_bytes_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); | 139 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace net | 142 } // namespace net |
| 143 | 143 |
| 144 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ | 144 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
| OLD | NEW |