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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.h

Issue 1455033004: Ping backup connection at a slower rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with head, address comments Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index 7d9b6121a2a9556b58d1ed8a22eef3e7f89cb15a..4fe9873a5023b48f807b7140a61ee83be7a152cd 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -180,6 +180,7 @@ class P2PTransportChannel : public TransportChannelImpl,
void UpdateChannelState();
void HandleAllTimedOut();
void MaybeStopPortAllocatorSessions();
+ TransportChannelState ComputeState() const;
Connection* GetBestConnectionOnNetwork(rtc::Network* network) const;
bool CreateConnections(const Candidate& remote_candidate,
@@ -193,7 +194,7 @@ class P2PTransportChannel : public TransportChannelImpl,
bool IsDuplicateRemoteCandidate(const Candidate& candidate);
void RememberRemoteCandidate(const Candidate& remote_candidate,
PortInterface* origin_port);
- bool IsPingable(Connection* conn);
+ bool IsPingable(Connection* conn, uint32_t now);
void PingConnection(Connection* conn);
void AddAllocatorSession(PortAllocatorSession* session);
void AddConnection(Connection* connection);
@@ -226,6 +227,7 @@ class P2PTransportChannel : public TransportChannelImpl,
void PruneConnections();
Connection* best_nominated_connection() const;
+ bool IsBackupConnection(Connection* conn) const;
P2PTransport* transport_;
PortAllocator* allocator_;
@@ -256,9 +258,11 @@ class P2PTransportChannel : public TransportChannelImpl,
int check_receiving_delay_;
int receiving_timeout_;
+ int backup_connection_ping_interval_;
uint32_t last_ping_sent_ms_ = 0;
bool gather_continually_ = false;
int weak_ping_delay_ = WEAK_PING_DELAY;
+ TransportChannelState state_ = TransportChannelState::STATE_INIT;
RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
};

Powered by Google App Engine
This is Rietveld 408576698