Index: webrtc/p2p/base/p2ptransportchannel.cc |
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc |
index f47f03bbd64f7276e7887f152941539799c80c22..2c7d9211130f4d8374d4f28ca8c57c6c0d486f5e 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel.cc |
+++ b/webrtc/p2p/base/p2ptransportchannel.cc |
@@ -276,6 +276,15 @@ IceTransportState P2PTransportChannel::GetState() const { |
return state_; |
} |
+rtc::Optional<int> P2PTransportChannel::GetRttEstimate() { |
+ if (selected_connection_ != nullptr |
+ && selected_connection_->rtt_samples() > 0) { |
+ 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 { |