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

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

Issue 1996693002: Fire a signal when the transport channel state changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Changed signal name to SignalStateChanged Created 4 years, 7 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') | webrtc/p2p/base/transportchannelimpl.h » ('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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1052 }
1053 1053
1054 void Connection::OnReadyToSend() { 1054 void Connection::OnReadyToSend() {
1055 if (write_state_ == STATE_WRITABLE) { 1055 if (write_state_ == STATE_WRITABLE) {
1056 SignalReadyToSend(this); 1056 SignalReadyToSend(this);
1057 } 1057 }
1058 } 1058 }
1059 1059
1060 void Connection::Prune() { 1060 void Connection::Prune() {
1061 if (!pruned_ || active()) { 1061 if (!pruned_ || active()) {
1062 LOG_J(LS_VERBOSE, this) << "Connection pruned"; 1062 LOG_J(LS_INFO, this) << "Connection pruned";
1063 pruned_ = true; 1063 pruned_ = true;
1064 requests_.Clear(); 1064 requests_.Clear();
1065 set_write_state(STATE_WRITE_TIMEOUT); 1065 set_write_state(STATE_WRITE_TIMEOUT);
1066 } 1066 }
1067 } 1067 }
1068 1068
1069 void Connection::Destroy() { 1069 void Connection::Destroy() {
1070 LOG_J(LS_VERBOSE, this) << "Connection destroyed"; 1070 LOG_J(LS_VERBOSE, this) << "Connection destroyed";
1071 port_->thread()->Post(this, MSG_DELETE); 1071 port_->thread()->Post(this, MSG_DELETE);
1072 } 1072 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 ASSERT(sent < 0); 1503 ASSERT(sent < 0);
1504 error_ = port_->GetError(); 1504 error_ = port_->GetError();
1505 sent_packets_discarded_++; 1505 sent_packets_discarded_++;
1506 } else { 1506 } else {
1507 send_rate_tracker_.AddSamples(sent); 1507 send_rate_tracker_.AddSamples(sent);
1508 } 1508 }
1509 return sent; 1509 return sent;
1510 } 1510 }
1511 1511
1512 } // namespace cricket 1512 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/transportchannelimpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698