| 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 #include "jingle/glue/pseudotcp_adapter.h" | 5 #include "jingle/glue/pseudotcp_adapter.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 int Read(net::IOBuffer* buffer, int buffer_size, | 31 int Read(net::IOBuffer* buffer, int buffer_size, |
| 32 const net::CompletionCallback& callback); | 32 const net::CompletionCallback& callback); |
| 33 int Write(net::IOBuffer* buffer, int buffer_size, | 33 int Write(net::IOBuffer* buffer, int buffer_size, |
| 34 const net::CompletionCallback& callback); | 34 const net::CompletionCallback& callback); |
| 35 int Connect(const net::CompletionCallback& callback); | 35 int Connect(const net::CompletionCallback& callback); |
| 36 void Disconnect(); | 36 void Disconnect(); |
| 37 bool IsConnected() const; | 37 bool IsConnected() const; |
| 38 | 38 |
| 39 // cricket::IPseudoTcpNotify interface. | 39 // cricket::IPseudoTcpNotify interface. |
| 40 // These notifications are triggered from NotifyPacket. | 40 // These notifications are triggered from NotifyPacket. |
| 41 virtual void OnTcpOpen(cricket::PseudoTcp* tcp) OVERRIDE; | 41 virtual void OnTcpOpen(cricket::PseudoTcp* tcp) override; |
| 42 virtual void OnTcpReadable(cricket::PseudoTcp* tcp) OVERRIDE; | 42 virtual void OnTcpReadable(cricket::PseudoTcp* tcp) override; |
| 43 virtual void OnTcpWriteable(cricket::PseudoTcp* tcp) OVERRIDE; | 43 virtual void OnTcpWriteable(cricket::PseudoTcp* tcp) override; |
| 44 // This is triggered by NotifyClock or NotifyPacket. | 44 // This is triggered by NotifyClock or NotifyPacket. |
| 45 virtual void OnTcpClosed(cricket::PseudoTcp* tcp, uint32 error) OVERRIDE; | 45 virtual void OnTcpClosed(cricket::PseudoTcp* tcp, uint32 error) override; |
| 46 // This is triggered by NotifyClock, NotifyPacket, Recv and Send. | 46 // This is triggered by NotifyClock, NotifyPacket, Recv and Send. |
| 47 virtual WriteResult TcpWritePacket(cricket::PseudoTcp* tcp, | 47 virtual WriteResult TcpWritePacket(cricket::PseudoTcp* tcp, |
| 48 const char* buffer, size_t len) OVERRIDE; | 48 const char* buffer, size_t len) override; |
| 49 | 49 |
| 50 void SetAckDelay(int delay_ms); | 50 void SetAckDelay(int delay_ms); |
| 51 void SetNoDelay(bool no_delay); | 51 void SetNoDelay(bool no_delay); |
| 52 void SetReceiveBufferSize(int32 size); | 52 void SetReceiveBufferSize(int32 size); |
| 53 void SetSendBufferSize(int32 size); | 53 void SetSendBufferSize(int32 size); |
| 54 void SetWriteWaitsForSend(bool write_waits_for_send); | 54 void SetWriteWaitsForSend(bool write_waits_for_send); |
| 55 | 55 |
| 56 void DeleteSocket(); | 56 void DeleteSocket(); |
| 57 | 57 |
| 58 private: | 58 private: |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 DCHECK(CalledOnValidThread()); | 589 DCHECK(CalledOnValidThread()); |
| 590 core_->SetNoDelay(no_delay); | 590 core_->SetNoDelay(no_delay); |
| 591 } | 591 } |
| 592 | 592 |
| 593 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) { | 593 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) { |
| 594 DCHECK(CalledOnValidThread()); | 594 DCHECK(CalledOnValidThread()); |
| 595 core_->SetWriteWaitsForSend(write_waits_for_send); | 595 core_->SetWriteWaitsForSend(write_waits_for_send); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace jingle_glue | 598 } // namespace jingle_glue |
| OLD | NEW |