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

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

Issue 1311433009: A few updates on connection states (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with the head Created 5 years, 2 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_unittest.cc ('k') | no next file » | 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 rtc::LoggingSeverity sev = !writable() ? rtc::LS_INFO : rtc::LS_VERBOSE; 1247 rtc::LoggingSeverity sev = !writable() ? rtc::LS_INFO : rtc::LS_VERBOSE;
1248 bool use_candidate = use_candidate_attr(); 1248 bool use_candidate = use_candidate_attr();
1249 LOG_JV(sev, this) << "Sent STUN ping" 1249 LOG_JV(sev, this) << "Sent STUN ping"
1250 << ", id=" << rtc::hex_encode(request->id()) 1250 << ", id=" << rtc::hex_encode(request->id())
1251 << ", use_candidate=" << use_candidate; 1251 << ", use_candidate=" << use_candidate;
1252 } 1252 }
1253 1253
1254 void Connection::CheckTimeout() { 1254 void Connection::CheckTimeout() {
1255 // If write has timed out and it is not receiving, remove the connection. 1255 // If write has timed out and it is not receiving, remove the connection.
1256 if (!receiving_ && write_state_ == STATE_WRITE_TIMEOUT) { 1256 if (!receiving_ && write_state_ == STATE_WRITE_TIMEOUT) {
1257 port_->thread()->Post(this, MSG_DELETE); 1257 Destroy();
1258 } 1258 }
1259 } 1259 }
1260 1260
1261 void Connection::HandleRoleConflictFromPeer() { 1261 void Connection::HandleRoleConflictFromPeer() {
1262 port_->SignalRoleConflict(port_); 1262 port_->SignalRoleConflict(port_);
1263 } 1263 }
1264 1264
1265 void Connection::MaybeSetRemoteIceCredentials(const std::string& ice_ufrag, 1265 void Connection::MaybeSetRemoteIceCredentials(const std::string& ice_ufrag,
1266 const std::string& ice_pwd) { 1266 const std::string& ice_pwd) {
1267 if (remote_candidate_.username() == ice_ufrag && 1267 if (remote_candidate_.username() == ice_ufrag &&
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 ASSERT(sent < 0); 1402 ASSERT(sent < 0);
1403 error_ = port_->GetError(); 1403 error_ = port_->GetError();
1404 sent_packets_discarded_++; 1404 sent_packets_discarded_++;
1405 } else { 1405 } else {
1406 send_rate_tracker_.AddSamples(sent); 1406 send_rate_tracker_.AddSamples(sent);
1407 } 1407 }
1408 return sent; 1408 return sent;
1409 } 1409 }
1410 1410
1411 } // namespace cricket 1411 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698