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

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

Issue 2670113002: Pick the DTLS handshake timeout based on the ICE RTT estimate (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index f47f03bbd64f7276e7887f152941539799c80c22..2f1f4477a3297429172aea53dbbf2b8e7b87bf78 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -276,6 +276,14 @@ IceTransportState P2PTransportChannel::GetState() const {
return state_;
}
+rtc::Optional<int> P2PTransportChannel::GetRttEstimate() {
+ if (selected_connection_ != nullptr) {
+ return rtc::Optional<int>(selected_connection_->rtt());
+ } else {
+ return rtc::Optional<int>();
+ }
+}
+
// A channel is considered ICE completed once there is at most one active
// connection per network and at least one active connection.
IceTransportState P2PTransportChannel::ComputeState() const {

Powered by Google App Engine
This is Rietveld 408576698