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

Unified Diff: webrtc/p2p/base/relayport.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: No changes to const parameters. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/relayport.cc
diff --git a/webrtc/p2p/base/relayport.cc b/webrtc/p2p/base/relayport.cc
index fc077ff1e1a80a99285ebc63a5d5df742e653e89..156e0ac0a69f4d068e237c853963ad658b13b3de 100644
--- a/webrtc/p2p/base/relayport.cc
+++ b/webrtc/p2p/base/relayport.cc
@@ -144,6 +144,11 @@ class RelayEntry : public rtc::MessageHandler,
const char* data, size_t size,
const rtc::SocketAddress& remote_addr,
const rtc::PacketTime& packet_time);
+
+ void OnPacketSent(rtc::AsyncPacketSocket* socket,
+ const rtc::SocketAddress& addr,
+ const rtc::SentPacket& sent_packet);
+
// Called when the socket is currently able to send.
void OnReadyToSend(rtc::AsyncPacketSocket* socket);
@@ -501,6 +506,7 @@ void RelayEntry::Connect() {
// Otherwise, create the new connection and configure any socket options.
socket->SignalReadPacket.connect(this, &RelayEntry::OnReadPacket);
+ socket->SignalPacketSent.connect(this, &RelayEntry::OnPacketSent);
socket->SignalReadyToSend.connect(this, &RelayEntry::OnReadyToSend);
current_connection_ = new RelayConnection(ra, socket, port()->thread());
for (size_t i = 0; i < port_->options().size(); ++i) {
@@ -740,6 +746,12 @@ void RelayEntry::OnReadPacket(
PROTO_UDP, packet_time);
}
+void RelayEntry::OnPacketSent(rtc::AsyncPacketSocket* socket,
+ const rtc::SocketAddress& addr,
+ const rtc::SentPacket& sent_packet) {
+ port_->OnPacketSent(addr, sent_packet);
+}
+
void RelayEntry::OnReadyToSend(rtc::AsyncPacketSocket* socket) {
if (connected()) {
port_->OnReadyToSend();

Powered by Google App Engine
This is Rietveld 408576698