OLD | NEW |
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 |
11 #ifndef WEBRTC_P2P_BASE_PORT_H_ | 11 #ifndef WEBRTC_P2P_BASE_PORT_H_ |
12 #define WEBRTC_P2P_BASE_PORT_H_ | 12 #define WEBRTC_P2P_BASE_PORT_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <memory> | 15 #include <memory> |
16 #include <set> | 16 #include <set> |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 #include "webrtc/p2p/base/candidate.h" | 20 #include "webrtc/p2p/base/candidate.h" |
21 #include "webrtc/p2p/base/candidatepairinterface.h" | 21 #include "webrtc/p2p/base/candidatepairinterface.h" |
22 #include "webrtc/p2p/base/jseptransport.h" | 22 #include "webrtc/p2p/base/jseptransport.h" |
23 #include "webrtc/p2p/base/packetsocketfactory.h" | 23 #include "webrtc/p2p/base/packetsocketfactory.h" |
24 #include "webrtc/p2p/base/portinterface.h" | 24 #include "webrtc/p2p/base/portinterface.h" |
25 #include "webrtc/p2p/base/stun.h" | 25 #include "webrtc/p2p/base/stun.h" |
26 #include "webrtc/p2p/base/stunrequest.h" | 26 #include "webrtc/p2p/base/stunrequest.h" |
27 #include "webrtc/base/asyncpacketsocket.h" | 27 #include "webrtc/base/asyncpacketsocket.h" |
28 #include "webrtc/base/checks.h" | 28 #include "webrtc/base/checks.h" |
29 #include "webrtc/base/network.h" | 29 #include "webrtc/base/network.h" |
| 30 #include "webrtc/base/optional.h" |
30 #include "webrtc/base/proxyinfo.h" | 31 #include "webrtc/base/proxyinfo.h" |
31 #include "webrtc/base/ratetracker.h" | 32 #include "webrtc/base/ratetracker.h" |
32 #include "webrtc/base/sigslot.h" | 33 #include "webrtc/base/sigslot.h" |
33 #include "webrtc/base/socketaddress.h" | 34 #include "webrtc/base/socketaddress.h" |
34 #include "webrtc/base/thread.h" | 35 #include "webrtc/base/thread.h" |
35 | 36 |
36 namespace cricket { | 37 namespace cricket { |
37 | 38 |
38 class Connection; | 39 class Connection; |
39 class ConnectionRequest; | 40 class ConnectionRequest; |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 uint32_t acked_nomination_ = 0; | 700 uint32_t acked_nomination_ = 0; |
700 // Used by the controlled side to remember the nomination value received from | 701 // Used by the controlled side to remember the nomination value received from |
701 // the controlling side. When the peer does not support ICE re-nomination, | 702 // the controlling side. When the peer does not support ICE re-nomination, |
702 // its value will be 1 if the connection has been nominated. | 703 // its value will be 1 if the connection has been nominated. |
703 uint32_t remote_nomination_ = 0; | 704 uint32_t remote_nomination_ = 0; |
704 | 705 |
705 IceMode remote_ice_mode_; | 706 IceMode remote_ice_mode_; |
706 StunRequestManager requests_; | 707 StunRequestManager requests_; |
707 int rtt_; | 708 int rtt_; |
708 int rtt_samples_ = 0; | 709 int rtt_samples_ = 0; |
| 710 // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-totalround
triptime |
| 711 uint64_t total_round_trip_time_ms_ = 0; |
| 712 // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-currentrou
ndtriptime |
| 713 rtc::Optional<uint32_t> current_round_trip_time_ms_; |
709 int64_t last_ping_sent_; // last time we sent a ping to the other side | 714 int64_t last_ping_sent_; // last time we sent a ping to the other side |
710 int64_t last_ping_received_; // last time we received a ping from the other | 715 int64_t last_ping_received_; // last time we received a ping from the other |
711 // side | 716 // side |
712 int64_t last_data_received_; | 717 int64_t last_data_received_; |
713 int64_t last_ping_response_received_; | 718 int64_t last_ping_response_received_; |
714 int64_t receiving_unchanged_since_ = 0; | 719 int64_t receiving_unchanged_since_ = 0; |
715 std::vector<SentPing> pings_since_last_response_; | 720 std::vector<SentPing> pings_since_last_response_; |
716 | 721 |
717 bool reported_; | 722 bool reported_; |
718 IceCandidatePairState state_; | 723 IceCandidatePairState state_; |
(...skipping 16 matching lines...) Expand all Loading... |
735 const rtc::PacketOptions& options) override; | 740 const rtc::PacketOptions& options) override; |
736 int GetError() override { return error_; } | 741 int GetError() override { return error_; } |
737 | 742 |
738 private: | 743 private: |
739 int error_ = 0; | 744 int error_ = 0; |
740 }; | 745 }; |
741 | 746 |
742 } // namespace cricket | 747 } // namespace cricket |
743 | 748 |
744 #endif // WEBRTC_P2P_BASE_PORT_H_ | 749 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |