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

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

Issue 1311433009: A few updates on connection states (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 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 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 335ee7d166205040c24b3cb0a74dc12bec59ca97..5b8d0a8aadbb858c40d96e4d6b5f1e9e842c8e60 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -177,10 +177,11 @@ class P2PTransportChannel : public TransportChannelImpl,
void HandleAllTimedOut();
Connection* GetBestConnectionOnNetwork(rtc::Network* network) const;
- bool CreateConnections(const Candidate &remote_candidate,
- PortInterface* origin_port, bool readable);
- bool CreateConnection(PortInterface* port, const Candidate& remote_candidate,
- PortInterface* origin_port, bool readable);
+ bool CreateConnections(const Candidate& remote_candidate,
+ PortInterface* origin_port);
+ bool CreateConnection(PortInterface* port,
+ const Candidate& remote_candidate,
+ PortInterface* origin_port);
bool FindConnection(cricket::Connection* connection) const;
uint32 GetRemoteCandidateGeneration(const Candidate& candidate);
@@ -215,9 +216,7 @@ class P2PTransportChannel : public TransportChannelImpl,
virtual void OnMessage(rtc::Message *pmsg);
void OnSort();
- void OnPing();
-
- void OnCheckReceiving();
+ void OnCheckAndPing();
void PruneConnections();
Connection* best_nominated_connection() const;
@@ -235,6 +234,7 @@ class P2PTransportChannel : public TransportChannelImpl,
// Connection selected by the controlling agent. This should be used only
// at controlled side when protocol type is RFC5245.
Connection* pending_best_connection_;
+ Connection* next_connection_to_ping_;
std::vector<RemoteCandidate> remote_candidates_;
bool sort_dirty_; // indicates whether another sort is needed right now
bool was_writable_;
@@ -251,6 +251,8 @@ class P2PTransportChannel : public TransportChannelImpl,
int check_receiving_delay_;
int receiving_timeout_;
+ int ping_delay_;
+ uint32 last_ping_sent_;
DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
};

Powered by Google App Engine
This is Rietveld 408576698