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

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: 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
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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 } 1011 }
1012 1012
1013 void Connection::OnReadyToSend() { 1013 void Connection::OnReadyToSend() {
1014 if (write_state_ == STATE_WRITABLE) { 1014 if (write_state_ == STATE_WRITABLE) {
1015 SignalReadyToSend(this); 1015 SignalReadyToSend(this);
1016 } 1016 }
1017 } 1017 }
1018 1018
1019 void Connection::Prune() { 1019 void Connection::Prune() {
1020 if (!pruned_ || active()) { 1020 if (!pruned_ || active()) {
1021 LOG_J(LS_VERBOSE, this) << "Connection pruned"; 1021 LOG_J(LS_INFO, this) << "Connection pruned";
1022 pruned_ = true; 1022 pruned_ = true;
1023 requests_.Clear(); 1023 requests_.Clear();
1024 set_write_state(STATE_WRITE_TIMEOUT); 1024 set_write_state(STATE_WRITE_TIMEOUT);
1025 } 1025 }
1026 } 1026 }
1027 1027
1028 void Connection::Destroy() { 1028 void Connection::Destroy() {
1029 LOG_J(LS_VERBOSE, this) << "Connection destroyed"; 1029 LOG_J(LS_VERBOSE, this) << "Connection destroyed";
1030 port_->thread()->Post(this, MSG_DELETE); 1030 port_->thread()->Post(this, MSG_DELETE);
1031 } 1031 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 ASSERT(sent < 0); 1462 ASSERT(sent < 0);
1463 error_ = port_->GetError(); 1463 error_ = port_->GetError();
1464 sent_packets_discarded_++; 1464 sent_packets_discarded_++;
1465 } else { 1465 } else {
1466 send_rate_tracker_.AddSamples(sent); 1466 send_rate_tracker_.AddSamples(sent);
1467 } 1467 }
1468 return sent; 1468 return sent;
1469 } 1469 }
1470 1470
1471 } // namespace cricket 1471 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698