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

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

Issue 1940493002: Add Stats to Stun ping. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 // Estimate of the round-trip time over this connection. 471 // Estimate of the round-trip time over this connection.
472 int rtt() const { return rtt_; } 472 int rtt() const { return rtt_; }
473 473
474 size_t sent_total_bytes(); 474 size_t sent_total_bytes();
475 size_t sent_bytes_second(); 475 size_t sent_bytes_second();
476 // Used to track how many packets are discarded in the application socket due 476 // Used to track how many packets are discarded in the application socket due
477 // to errors. 477 // to errors.
478 size_t sent_discarded_packets(); 478 size_t sent_discarded_packets();
479 size_t sent_total_packets(); 479 size_t sent_total_packets();
480 size_t sent_ping_requests();
480 size_t recv_total_bytes(); 481 size_t recv_total_bytes();
481 size_t recv_bytes_second(); 482 size_t recv_bytes_second();
483 size_t recv_ping_responses();
482 sigslot::signal1<Connection*> SignalStateChange; 484 sigslot::signal1<Connection*> SignalStateChange;
483 485
484 // Sent when the connection has decided that it is no longer of value. It 486 // Sent when the connection has decided that it is no longer of value. It
485 // will delete itself immediately after this call. 487 // will delete itself immediately after this call.
486 sigslot::signal1<Connection*> SignalDestroyed; 488 sigslot::signal1<Connection*> SignalDestroyed;
487 489
488 // The connection can send and receive packets asynchronously. This matches 490 // The connection can send and receive packets asynchronously. This matches
489 // the interface of AsyncPacketSocket, which may use UDP or TCP under the 491 // the interface of AsyncPacketSocket, which may use UDP or TCP under the
490 // covers. 492 // covers.
491 virtual int Send(const void* data, size_t size, 493 virtual int Send(const void* data, size_t size,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 int64_t last_ping_received_; // last time we received a ping from the other 642 int64_t last_ping_received_; // last time we received a ping from the other
641 // side 643 // side
642 int64_t last_data_received_; 644 int64_t last_data_received_;
643 int64_t last_ping_response_received_; 645 int64_t last_ping_response_received_;
644 std::vector<SentPing> pings_since_last_response_; 646 std::vector<SentPing> pings_since_last_response_;
645 647
646 rtc::RateTracker recv_rate_tracker_; 648 rtc::RateTracker recv_rate_tracker_;
647 rtc::RateTracker send_rate_tracker_; 649 rtc::RateTracker send_rate_tracker_;
648 uint32_t sent_packets_discarded_; 650 uint32_t sent_packets_discarded_;
649 uint32_t sent_packets_total_; 651 uint32_t sent_packets_total_;
652 uint32_t sent_ping_requests_;
653 uint32_t recv_ping_responses_;
650 654
651 private: 655 private:
652 void MaybeAddPrflxCandidate(ConnectionRequest* request, 656 void MaybeAddPrflxCandidate(ConnectionRequest* request,
653 StunMessage* response); 657 StunMessage* response);
654 658
655 bool reported_; 659 bool reported_;
656 State state_; 660 State state_;
657 // Time duration to switch from receiving to not receiving. 661 // Time duration to switch from receiving to not receiving.
658 int receiving_timeout_; 662 int receiving_timeout_;
659 int64_t time_created_ms_; 663 int64_t time_created_ms_;
(...skipping 12 matching lines...) Expand all
672 const rtc::PacketOptions& options) override; 676 const rtc::PacketOptions& options) override;
673 int GetError() override { return error_; } 677 int GetError() override { return error_; }
674 678
675 private: 679 private:
676 int error_ = 0; 680 int error_ = 0;
677 }; 681 };
678 682
679 } // namespace cricket 683 } // namespace cricket
680 684
681 #endif // WEBRTC_P2P_BASE_PORT_H_ 685 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698