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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 2670113002: Pick the DTLS handshake timeout based on the ICE RTT estimate (Closed)
Patch Set: Rename InitialHandshakeRetransmissionTimeout -> InitialRetransmissionTimeout. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return; 269 return;
270 } 270 }
271 271
272 tiebreaker_ = tiebreaker; 272 tiebreaker_ = tiebreaker;
273 } 273 }
274 274
275 IceTransportState P2PTransportChannel::GetState() const { 275 IceTransportState P2PTransportChannel::GetState() const {
276 return state_; 276 return state_;
277 } 277 }
278 278
279 rtc::Optional<int> P2PTransportChannel::GetRttEstimate() {
280 if (selected_connection_ != nullptr
281 && selected_connection_->rtt_samples() > 0) {
282 return rtc::Optional<int>(selected_connection_->rtt());
283 } else {
284 return rtc::Optional<int>();
285 }
286 }
287
279 // A channel is considered ICE completed once there is at most one active 288 // A channel is considered ICE completed once there is at most one active
280 // connection per network and at least one active connection. 289 // connection per network and at least one active connection.
281 IceTransportState P2PTransportChannel::ComputeState() const { 290 IceTransportState P2PTransportChannel::ComputeState() const {
282 if (!had_connection_) { 291 if (!had_connection_) {
283 return IceTransportState::STATE_INIT; 292 return IceTransportState::STATE_INIT;
284 } 293 }
285 294
286 std::vector<Connection*> active_connections; 295 std::vector<Connection*> active_connections;
287 for (Connection* connection : connections_) { 296 for (Connection* connection : connections_) {
288 if (connection->active()) { 297 if (connection->active()) {
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 2043
2035 void P2PTransportChannel::set_receiving(bool receiving) { 2044 void P2PTransportChannel::set_receiving(bool receiving) {
2036 if (receiving_ == receiving) { 2045 if (receiving_ == receiving) {
2037 return; 2046 return;
2038 } 2047 }
2039 receiving_ = receiving; 2048 receiving_ = receiving;
2040 SignalReceivingState(this); 2049 SignalReceivingState(this);
2041 } 2050 }
2042 2051
2043 } // namespace cricket 2052 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698