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

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

Issue 1364683002: Do not prune if the current best connection is weak. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Change the test name and merge 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 }; 429 };
430 430
431 WriteState write_state() const { return write_state_; } 431 WriteState write_state() const { return write_state_; }
432 bool writable() const { return write_state_ == STATE_WRITABLE; } 432 bool writable() const { return write_state_ == STATE_WRITABLE; }
433 bool receiving() const { return receiving_; } 433 bool receiving() const { return receiving_; }
434 434
435 // Determines whether the connection has finished connecting. This can only 435 // Determines whether the connection has finished connecting. This can only
436 // be false for TCP connections. 436 // be false for TCP connections.
437 bool connected() const { return connected_; } 437 bool connected() const { return connected_; }
438 438
439 bool Weak() const { return !(writable() && receiving() && connected()); }
440
439 // Estimate of the round-trip time over this connection. 441 // Estimate of the round-trip time over this connection.
440 uint32 rtt() const { return rtt_; } 442 uint32 rtt() const { return rtt_; }
441 443
442 size_t sent_total_bytes(); 444 size_t sent_total_bytes();
443 size_t sent_bytes_second(); 445 size_t sent_bytes_second();
444 // Used to track how many packets are discarded in the application socket due 446 // Used to track how many packets are discarded in the application socket due
445 // to errors. 447 // to errors.
446 size_t sent_discarded_packets(); 448 size_t sent_discarded_packets();
447 size_t sent_total_packets(); 449 size_t sent_total_packets();
448 size_t recv_total_bytes(); 450 size_t recv_total_bytes();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 const rtc::PacketOptions& options); 629 const rtc::PacketOptions& options);
628 virtual int GetError() { return error_; } 630 virtual int GetError() { return error_; }
629 631
630 private: 632 private:
631 int error_; 633 int error_;
632 }; 634 };
633 635
634 } // namespace cricket 636 } // namespace cricket
635 637
636 #endif // WEBRTC_P2P_BASE_PORT_H_ 638 #endif // WEBRTC_P2P_BASE_PORT_H_
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