Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: webrtc/p2p/base/relayport.cc

Issue 1577873003: Connect TurnPort and TCPPort to AsyncPacketSocket::SignalSentPacket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Improve comments. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/relayport.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 10 #include <algorithm>
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 return; 747 return;
748 } 748 }
749 749
750 // Process the actual data and remote address in the normal manner. 750 // Process the actual data and remote address in the normal manner.
751 port_->OnReadPacket(data_attr->bytes(), data_attr->length(), remote_addr2, 751 port_->OnReadPacket(data_attr->bytes(), data_attr->length(), remote_addr2,
752 PROTO_UDP, packet_time); 752 PROTO_UDP, packet_time);
753 } 753 }
754 754
755 void RelayEntry::OnSentPacket(rtc::AsyncPacketSocket* socket, 755 void RelayEntry::OnSentPacket(rtc::AsyncPacketSocket* socket,
756 const rtc::SentPacket& sent_packet) { 756 const rtc::SentPacket& sent_packet) {
757 port_->OnSentPacket(sent_packet); 757 port_->OnSentPacket(socket, sent_packet);
758 } 758 }
759 759
760 void RelayEntry::OnReadyToSend(rtc::AsyncPacketSocket* socket) { 760 void RelayEntry::OnReadyToSend(rtc::AsyncPacketSocket* socket) {
761 if (connected()) { 761 if (connected()) {
762 port_->OnReadyToSend(); 762 port_->OnReadyToSend();
763 } 763 }
764 } 764 }
765 765
766 int RelayEntry::SendPacket(const void* data, size_t size, 766 int RelayEntry::SendPacket(const void* data, size_t size,
767 const rtc::PacketOptions& options) { 767 const rtc::PacketOptions& options) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 if (rtc::TimeSince(start_time_) <= kRetryTimeout) 837 if (rtc::TimeSince(start_time_) <= kRetryTimeout)
838 entry_->ScheduleKeepAlive(); 838 entry_->ScheduleKeepAlive();
839 } 839 }
840 840
841 void AllocateRequest::OnTimeout() { 841 void AllocateRequest::OnTimeout() {
842 LOG(INFO) << "Allocate request timed out"; 842 LOG(INFO) << "Allocate request timed out";
843 entry_->HandleConnectFailure(connection_->socket()); 843 entry_->HandleConnectFailure(connection_->socket());
844 } 844 }
845 845
846 } // namespace cricket 846 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/relayport.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698