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

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

Issue 2099783002: Fixing bug where Connection drops packets when presumed writable. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master. Created 4 years, 5 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/port.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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 bool writable() const { return write_state_ == STATE_WRITABLE; } 454 bool writable() const { return write_state_ == STATE_WRITABLE; }
455 bool receiving() const { return receiving_; } 455 bool receiving() const { return receiving_; }
456 456
457 // Determines whether the connection has finished connecting. This can only 457 // Determines whether the connection has finished connecting. This can only
458 // be false for TCP connections. 458 // be false for TCP connections.
459 bool connected() const { return connected_; } 459 bool connected() const { return connected_; }
460 bool weak() const { return !(writable() && receiving() && connected()); } 460 bool weak() const { return !(writable() && receiving() && connected()); }
461 bool active() const { 461 bool active() const {
462 return write_state_ != STATE_WRITE_TIMEOUT; 462 return write_state_ != STATE_WRITE_TIMEOUT;
463 } 463 }
464 virtual bool ReadyToSendMedia() const {
465 return write_state_ == STATE_WRITABLE ||
466 write_state_ == STATE_WRITE_UNRELIABLE;
467 }
468 464
469 // A connection is dead if it can be safely deleted. 465 // A connection is dead if it can be safely deleted.
470 bool dead(int64_t now) const; 466 bool dead(int64_t now) const;
471 467
472 // Estimate of the round-trip time over this connection. 468 // Estimate of the round-trip time over this connection.
473 int rtt() const { return rtt_; } 469 int rtt() const { return rtt_; }
474 470
475 ConnectionInfo stats(); 471 ConnectionInfo stats();
476 472
477 sigslot::signal1<Connection*> SignalStateChange; 473 sigslot::signal1<Connection*> SignalStateChange;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 const rtc::PacketOptions& options) override; 681 const rtc::PacketOptions& options) override;
686 int GetError() override { return error_; } 682 int GetError() override { return error_; }
687 683
688 private: 684 private:
689 int error_ = 0; 685 int error_ = 0;
690 }; 686 };
691 687
692 } // namespace cricket 688 } // namespace cricket
693 689
694 #endif // WEBRTC_P2P_BASE_PORT_H_ 690 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698