OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 if (Connection* conn = GetConnection(remote_addr)) { | 334 if (Connection* conn = GetConnection(remote_addr)) { |
335 conn->OnReadPacket(data, size, packet_time); | 335 conn->OnReadPacket(data, size, packet_time); |
336 } else { | 336 } else { |
337 Port::OnReadPacket(data, size, remote_addr, PROTO_UDP); | 337 Port::OnReadPacket(data, size, remote_addr, PROTO_UDP); |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 void UDPPort::OnSentPacket(rtc::AsyncPacketSocket* socket, | 341 void UDPPort::OnSentPacket(rtc::AsyncPacketSocket* socket, |
342 const rtc::SentPacket& sent_packet) { | 342 const rtc::SentPacket& sent_packet) { |
343 Port::OnSentPacket(sent_packet); | 343 PortInterface::SignalSentPacket(sent_packet); |
344 } | 344 } |
345 | 345 |
346 void UDPPort::OnReadyToSend(rtc::AsyncPacketSocket* socket) { | 346 void UDPPort::OnReadyToSend(rtc::AsyncPacketSocket* socket) { |
347 Port::OnReadyToSend(); | 347 Port::OnReadyToSend(); |
348 } | 348 } |
349 | 349 |
350 void UDPPort::SendStunBindingRequests() { | 350 void UDPPort::SendStunBindingRequests() { |
351 // We will keep pinging the stun server to make sure our NAT pin-hole stays | 351 // We will keep pinging the stun server to make sure our NAT pin-hole stays |
352 // open until the deadline (specified in SendStunBindingRequest). | 352 // open until the deadline (specified in SendStunBindingRequest). |
353 ASSERT(requests_.empty()); | 353 ASSERT(requests_.empty()); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 const std::vector<Candidate>& existing_candidates = Candidates(); | 505 const std::vector<Candidate>& existing_candidates = Candidates(); |
506 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); | 506 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); |
507 for (; it != existing_candidates.end(); ++it) { | 507 for (; it != existing_candidates.end(); ++it) { |
508 if (it->address() == addr) | 508 if (it->address() == addr) |
509 return true; | 509 return true; |
510 } | 510 } |
511 return false; | 511 return false; |
512 } | 512 } |
513 | 513 |
514 } // namespace cricket | 514 } // namespace cricket |
OLD | NEW |