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

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

Issue 1231913003: Add methods to set the ICE connection receiving_timeout values. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address comments Created 5 years, 5 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
« no previous file with comments | « webrtc/p2p/base/session.h ('k') | webrtc/p2p/base/session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/session.cc
diff --git a/webrtc/p2p/base/session.cc b/webrtc/p2p/base/session.cc
index 55b1d90c1a811563a69f9793ae04fff1f6886054..d7a8625307c71bf0ce7adae665415f263e84f1fc 100644
--- a/webrtc/p2p/base/session.cc
+++ b/webrtc/p2p/base/session.cc
@@ -344,7 +344,8 @@ BaseSession::BaseSession(rtc::Thread* signaling_thread,
identity_(NULL),
ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
ice_tiebreaker_(rtc::CreateRandomId64()),
- role_switch_(false) {
+ role_switch_(false),
+ ice_receiving_timeout_(-1) {
ASSERT(signaling_thread->IsCurrent());
}
@@ -477,6 +478,16 @@ bool BaseSession::PushdownRemoteTransportDescription(
return true;
}
+void BaseSession::SetIceConnectionReceivingTimeout(int timeout_ms) {
+ ice_receiving_timeout_ = timeout_ms;
+ for (const auto& kv : transport_proxies()) {
+ Transport* transport = kv.second->impl();
+ if (transport) {
+ transport->SetChannelReceivingTimeout(timeout_ms);
+ }
+ }
+}
+
TransportChannel* BaseSession::CreateChannel(const std::string& content_name,
int component) {
// We create the proxy "on demand" here because we need to support
@@ -566,12 +577,13 @@ void BaseSession::DestroyTransportProxy(
}
}
-cricket::Transport* BaseSession::CreateTransport(
- const std::string& content_name) {
+Transport* BaseSession::CreateTransport(const std::string& content_name) {
ASSERT(transport_type_ == NS_GINGLE_P2P);
- return new cricket::DtlsTransport<P2PTransport>(
- signaling_thread(), worker_thread(), content_name,
- port_allocator(), identity_);
+ Transport* transport = new DtlsTransport<P2PTransport>(
+ signaling_thread(), worker_thread(), content_name, port_allocator(),
+ identity_);
+ transport->SetChannelReceivingTimeout(ice_receiving_timeout_);
+ return transport;
}
void BaseSession::SetState(State state) {
« no previous file with comments | « webrtc/p2p/base/session.h ('k') | webrtc/p2p/base/session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698