| 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.h" | 9 #include "base/time.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 bool PseudoTcpAdapter::IsConnected() const { | 514 bool PseudoTcpAdapter::IsConnected() const { |
| 515 return core_->IsConnected(); | 515 return core_->IsConnected(); |
| 516 } | 516 } |
| 517 | 517 |
| 518 bool PseudoTcpAdapter::IsConnectedAndIdle() const { | 518 bool PseudoTcpAdapter::IsConnectedAndIdle() const { |
| 519 DCHECK(CalledOnValidThread()); | 519 DCHECK(CalledOnValidThread()); |
| 520 NOTIMPLEMENTED(); | 520 NOTIMPLEMENTED(); |
| 521 return false; | 521 return false; |
| 522 } | 522 } |
| 523 | 523 |
| 524 int PseudoTcpAdapter::GetPeerAddress(net::AddressList* address) const { | 524 int PseudoTcpAdapter::GetPeerAddress(net::IPEndPoint* address) const { |
| 525 DCHECK(CalledOnValidThread()); | 525 DCHECK(CalledOnValidThread()); |
| 526 | 526 |
| 527 // We don't have a meaningful peer address, but we can't return an | 527 // We don't have a meaningful peer address, but we can't return an |
| 528 // error, so we return a INADDR_ANY instead. | 528 // error, so we return a INADDR_ANY instead. |
| 529 net::IPAddressNumber ip_address(4); | 529 net::IPAddressNumber ip_address(net::kIPv4AddressSize); |
| 530 *address = net::AddressList::CreateFromIPAddress(ip_address, 0); | 530 *address = net::IPEndPoint(ip_address, 0); |
| 531 return net::OK; | 531 return net::OK; |
| 532 } | 532 } |
| 533 | 533 |
| 534 int PseudoTcpAdapter::GetLocalAddress(net::IPEndPoint* address) const { | 534 int PseudoTcpAdapter::GetLocalAddress(net::IPEndPoint* address) const { |
| 535 DCHECK(CalledOnValidThread()); | 535 DCHECK(CalledOnValidThread()); |
| 536 NOTIMPLEMENTED(); | 536 NOTIMPLEMENTED(); |
| 537 return net::ERR_FAILED; | 537 return net::ERR_FAILED; |
| 538 } | 538 } |
| 539 | 539 |
| 540 const net::BoundNetLog& PseudoTcpAdapter::NetLog() const { | 540 const net::BoundNetLog& PseudoTcpAdapter::NetLog() const { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 DCHECK(CalledOnValidThread()); | 587 DCHECK(CalledOnValidThread()); |
| 588 core_->SetNoDelay(no_delay); | 588 core_->SetNoDelay(no_delay); |
| 589 } | 589 } |
| 590 | 590 |
| 591 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) { | 591 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) { |
| 592 DCHECK(CalledOnValidThread()); | 592 DCHECK(CalledOnValidThread()); |
| 593 core_->SetWriteWaitsForSend(write_waits_for_send); | 593 core_->SetWriteWaitsForSend(write_waits_for_send); |
| 594 } | 594 } |
| 595 | 595 |
| 596 } // namespace jingle_glue | 596 } // namespace jingle_glue |
| OLD | NEW |