| Index: jingle/glue/pseudotcp_adapter.cc
|
| diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc
|
| index b86c805607011099e347f37ec29ac374edbcf71d..175adbe8f692756209004e56f8cd4a03815af040 100644
|
| --- a/jingle/glue/pseudotcp_adapter.cc
|
| +++ b/jingle/glue/pseudotcp_adapter.cc
|
| @@ -46,6 +46,10 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
|
| // This is triggered by NotifyClock, NotifyPacket, Recv and Send.
|
| virtual WriteResult TcpWritePacket(cricket::PseudoTcp* tcp,
|
| const char* buffer, size_t len) OVERRIDE;
|
| +
|
| + void SetAckDelay(int delay_ms);
|
| + void SetNagling(bool nagling);
|
| +
|
| private:
|
| // These are invoked by the underlying Socket, and may trigger callbacks.
|
| // They hold a reference to |this| while running, to protect from deletion.
|
| @@ -269,6 +273,14 @@ void PseudoTcpAdapter::Core::OnTcpClosed(PseudoTcp* tcp, uint32 error) {
|
| }
|
| }
|
|
|
| +void PseudoTcpAdapter::Core::SetAckDelay(int delay_ms) {
|
| + pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_ACKDELAY, delay_ms);
|
| +}
|
| +
|
| +void PseudoTcpAdapter::Core::SetNagling(bool nagling) {
|
| + pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_NODELAY, nagling ? 1 : 0);
|
| +}
|
| +
|
| cricket::IPseudoTcpNotify::WriteResult PseudoTcpAdapter::Core::TcpWritePacket(
|
| PseudoTcp* tcp,
|
| const char* buffer,
|
| @@ -473,4 +485,14 @@ base::TimeDelta PseudoTcpAdapter::GetConnectTimeMicros() const {
|
| return base::TimeDelta::FromMicroseconds(-1);
|
| }
|
|
|
| +void PseudoTcpAdapter::SetAckDelay(int delay_ms) {
|
| + DCHECK(CalledOnValidThread());
|
| + core_->SetAckDelay(delay_ms);
|
| +}
|
| +
|
| +void PseudoTcpAdapter::SetNagling(bool nagling) {
|
| + DCHECK(CalledOnValidThread());
|
| + core_->SetNagling(nagling);
|
| +}
|
| +
|
| } // namespace jingle_glue
|
|
|