| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ | 5 #ifndef REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ |
| 6 #define REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ | 6 #define REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
| 9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
| 13 #include "net/log/net_log.h" | 15 #include "net/log/net_log.h" |
| 14 #include "remoting/protocol/p2p_stream_socket.h" | 16 #include "remoting/protocol/p2p_stream_socket.h" |
| 15 #include "third_party/webrtc/p2p/base/pseudotcp.h" | 17 #include "third_party/webrtc/p2p/base/pseudotcp.h" |
| 16 | 18 |
| 17 namespace remoting { | 19 namespace remoting { |
| 18 namespace protocol { | 20 namespace protocol { |
| 19 | 21 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 | 33 |
| 32 // P2PStreamSocket implementation. | 34 // P2PStreamSocket implementation. |
| 33 int Read(const scoped_refptr<net::IOBuffer>& buffer, int buffer_size, | 35 int Read(const scoped_refptr<net::IOBuffer>& buffer, int buffer_size, |
| 34 const net::CompletionCallback& callback) override; | 36 const net::CompletionCallback& callback) override; |
| 35 int Write(const scoped_refptr<net::IOBuffer>& buffer, int buffer_size, | 37 int Write(const scoped_refptr<net::IOBuffer>& buffer, int buffer_size, |
| 36 const net::CompletionCallback& callback) override; | 38 const net::CompletionCallback& callback) override; |
| 37 | 39 |
| 38 int Connect(const net::CompletionCallback& callback); | 40 int Connect(const net::CompletionCallback& callback); |
| 39 | 41 |
| 40 // Set receive and send buffer sizes. | 42 // Set receive and send buffer sizes. |
| 41 int SetReceiveBufferSize(int32 size); | 43 int SetReceiveBufferSize(int32_t size); |
| 42 int SetSendBufferSize(int32 size); | 44 int SetSendBufferSize(int32_t size); |
| 43 | 45 |
| 44 // Set the delay for sending ACK. | 46 // Set the delay for sending ACK. |
| 45 void SetAckDelay(int delay_ms); | 47 void SetAckDelay(int delay_ms); |
| 46 | 48 |
| 47 // Set whether Nagle's algorithm is enabled. | 49 // Set whether Nagle's algorithm is enabled. |
| 48 void SetNoDelay(bool no_delay); | 50 void SetNoDelay(bool no_delay); |
| 49 | 51 |
| 50 // When write_waits_for_send flag is set to true the Write() method | 52 // When write_waits_for_send flag is set to true the Write() method |
| 51 // will wait until the data is sent to the remote end before the | 53 // will wait until the data is sent to the remote end before the |
| 52 // write completes (it still doesn't wait until the data is received | 54 // write completes (it still doesn't wait until the data is received |
| (...skipping 19 matching lines...) Expand all Loading... |
| 72 | 74 |
| 73 net::BoundNetLog net_log_; | 75 net::BoundNetLog net_log_; |
| 74 | 76 |
| 75 DISALLOW_COPY_AND_ASSIGN(PseudoTcpAdapter); | 77 DISALLOW_COPY_AND_ASSIGN(PseudoTcpAdapter); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace protocol | 80 } // namespace protocol |
| 79 } // namespace remoting | 81 } // namespace remoting |
| 80 | 82 |
| 81 #endif // REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ | 83 #endif // REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ |
| OLD | NEW |