OLD | NEW |
---|---|
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 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 | 167 |
168 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { | 168 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { |
169 ASSERT(worker_thread()->IsCurrent()); | 169 ASSERT(worker_thread()->IsCurrent()); |
170 if (channels_.empty()) | 170 if (channels_.empty()) |
171 return false; | 171 return false; |
172 | 172 |
173 ChannelMap::iterator iter = channels_.begin(); | 173 ChannelMap::iterator iter = channels_.begin(); |
174 return iter->second->GetRemoteCertificate(cert); | 174 return iter->second->GetRemoteCertificate(cert); |
175 } | 175 } |
176 | 176 |
177 void Transport::SetChannelReceivingTimeout(int timeout_ms) { | |
178 worker_thread_->Invoke<void>(Bind( | |
179 &Transport::SetChannelReceivingTimeout_w, this, timeout_ms)); | |
180 } | |
181 | |
182 void Transport::SetChannelReceivingTimeout_w(int timeout_ms) { | |
183 ASSERT(worker_thread()->IsCurrent()); | |
184 for (const auto& kv : channels_) { | |
185 kv.second->SetReceivingTimeout(timeout_ms); | |
186 } | |
pthatcher1
2015/07/09 22:21:41
The Transport needs to remember the value and appl
honghaiz3
2015/08/05 23:57:39
Done.
| |
187 } | |
188 | |
177 bool Transport::SetLocalTransportDescription( | 189 bool Transport::SetLocalTransportDescription( |
178 const TransportDescription& description, | 190 const TransportDescription& description, |
179 ContentAction action, | 191 ContentAction action, |
180 std::string* error_desc) { | 192 std::string* error_desc) { |
181 return worker_thread_->Invoke<bool>(Bind( | 193 return worker_thread_->Invoke<bool>(Bind( |
182 &Transport::SetLocalTransportDescription_w, this, | 194 &Transport::SetLocalTransportDescription_w, this, |
183 description, action, error_desc)); | 195 description, action, error_desc)); |
184 } | 196 } |
185 | 197 |
186 bool Transport::SetRemoteTransportDescription( | 198 bool Transport::SetRemoteTransportDescription( |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
965 const TransportDescription* desc) { | 977 const TransportDescription* desc) { |
966 ASSERT(desc != NULL); | 978 ASSERT(desc != NULL); |
967 if (desc->transport_type == NS_JINGLE_ICE_UDP) { | 979 if (desc->transport_type == NS_JINGLE_ICE_UDP) { |
968 return (desc->HasOption(ICE_OPTION_GICE)) ? | 980 return (desc->HasOption(ICE_OPTION_GICE)) ? |
969 ICEPROTO_HYBRID : ICEPROTO_RFC5245; | 981 ICEPROTO_HYBRID : ICEPROTO_RFC5245; |
970 } | 982 } |
971 return ICEPROTO_GOOGLE; | 983 return ICEPROTO_GOOGLE; |
972 } | 984 } |
973 | 985 |
974 } // namespace cricket | 986 } // namespace cricket |
OLD | NEW |