| 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 #include "jingle/glue/pseudotcp_adapter.h" | 5 #include "jingle/glue/pseudotcp_adapter.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "net/base/address_list.h" | 9 #include "net/base/address_list.h" |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 bool PseudoTcpAdapter::IsConnectedAndIdle() const { | 441 bool PseudoTcpAdapter::IsConnectedAndIdle() const { |
| 442 DCHECK(CalledOnValidThread()); | 442 DCHECK(CalledOnValidThread()); |
| 443 NOTIMPLEMENTED(); | 443 NOTIMPLEMENTED(); |
| 444 return false; | 444 return false; |
| 445 } | 445 } |
| 446 | 446 |
| 447 int PseudoTcpAdapter::GetPeerAddress(net::AddressList* address) const { | 447 int PseudoTcpAdapter::GetPeerAddress(net::AddressList* address) const { |
| 448 DCHECK(CalledOnValidThread()); | 448 DCHECK(CalledOnValidThread()); |
| 449 | 449 |
| 450 // We actually don't know the peer address. Returning so the upper layers | 450 // We don't have a meaningful peer address, but we can't return an |
| 451 // won't complain. | 451 // error, so we return a INADDR_ANY instead. |
| 452 net::IPAddressNumber ip_address(4); | 452 net::IPAddressNumber ip_address(4); |
| 453 *address = net::AddressList::CreateFromIPAddress(ip_address, 0); | 453 *address = net::AddressList::CreateFromIPAddress(ip_address, 0); |
| 454 return net::OK; | 454 return net::OK; |
| 455 } | 455 } |
| 456 | 456 |
| 457 int PseudoTcpAdapter::GetLocalAddress(net::IPEndPoint* address) const { | 457 int PseudoTcpAdapter::GetLocalAddress(net::IPEndPoint* address) const { |
| 458 DCHECK(CalledOnValidThread()); | 458 DCHECK(CalledOnValidThread()); |
| 459 NOTIMPLEMENTED(); | 459 NOTIMPLEMENTED(); |
| 460 return net::ERR_FAILED; | 460 return net::ERR_FAILED; |
| 461 } | 461 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 DCHECK(CalledOnValidThread()); | 500 DCHECK(CalledOnValidThread()); |
| 501 core_->SetAckDelay(delay_ms); | 501 core_->SetAckDelay(delay_ms); |
| 502 } | 502 } |
| 503 | 503 |
| 504 void PseudoTcpAdapter::SetNoDelay(bool no_delay) { | 504 void PseudoTcpAdapter::SetNoDelay(bool no_delay) { |
| 505 DCHECK(CalledOnValidThread()); | 505 DCHECK(CalledOnValidThread()); |
| 506 core_->SetNoDelay(no_delay); | 506 core_->SetNoDelay(no_delay); |
| 507 } | 507 } |
| 508 | 508 |
| 509 } // namespace jingle_glue | 509 } // namespace jingle_glue |
| OLD | NEW |