Chromium Code Reviews| Index: webrtc/p2p/base/p2ptransportchannel.h |
| diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h |
| index a8f16666c9625897de4cff8e9f0e11a86c76d13e..734af4353fb53ac2a2f5e993c8b4e43382d8c0c2 100644 |
| --- a/webrtc/p2p/base/p2ptransportchannel.h |
| +++ b/webrtc/p2p/base/p2ptransportchannel.h |
| @@ -158,6 +158,9 @@ class P2PTransportChannel : public TransportChannelImpl, |
| // Public for unit tests. |
| Connection* FindNextPingableConnection(); |
| + // Public for unit tests. |
| + // |connections_| should not be changed from outside. |
|
pthatcher1
2015/09/21 23:49:18
from outside => from the outside.
But if it's mar
honghaiz3
2015/09/22 19:35:08
Right, don't need the comments.
|
| + const std::vector<Connection*>& connections() { return connections_; } |
| private: |
| rtc::Thread* thread() { return worker_thread_; } |
| @@ -165,6 +168,9 @@ class P2PTransportChannel : public TransportChannelImpl, |
| return allocator_sessions_.back(); |
| } |
| + // A transport channel is weak if the current best connection is either |
| + // not receiving or not writable, or if there is no best connection at all. |
| + bool Weak() const; |
| void Allocate(); |
| void UpdateConnectionStates(); |
| void RequestSort(); |
| @@ -215,9 +221,7 @@ class P2PTransportChannel : public TransportChannelImpl, |
| void OnMessage(rtc::Message *pmsg) override; |
| void OnSort(); |
| - void OnPing(); |
| - |
| - void OnCheckReceiving(); |
| + void OnCheckAndPing(); |
| void PruneConnections(); |
| Connection* best_nominated_connection() const; |
| @@ -251,6 +255,7 @@ class P2PTransportChannel : public TransportChannelImpl, |
| int check_receiving_delay_; |
| int receiving_timeout_; |
| + uint32 last_ping_sent_; |
|
pthatcher1
2015/09/21 23:49:18
Can you make it clear this is a timestamp, perhaps
honghaiz3
2015/09/22 19:35:08
Done.
|
| RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
| }; |