Chromium Code Reviews| Index: webrtc/p2p/base/stunport.h |
| diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h |
| index ecf61a782dfc13ad2d3e64df48dbaa45c5c51324..2ab6048c50230506669fb49012b32dce72dc28c6 100644 |
| --- a/webrtc/p2p/base/stunport.h |
| +++ b/webrtc/p2p/base/stunport.h |
| @@ -106,6 +106,14 @@ class UDPPort : public Port { |
| return stun_keepalive_delay_; |
| } |
| + // Visible for testing. |
| + int stun_keepalive_lifetime() const { return stun_keepalive_lifetime_; } |
| + void set_stun_keepalive_lifetime(int lifetime) { |
| + stun_keepalive_lifetime_ = lifetime; |
| + } |
| + // Returns true if there is a pending request with type |msg_type|. |
| + bool RequestExists(int msg_type) { return requests_.Exist(msg_type); } |
|
pthatcher1
2016/03/02 20:25:59
A better name might be HasPendingRequest
honghaiz3
2016/03/02 23:22:51
Done.
|
| + |
| protected: |
| UDPPort(rtc::Thread* thread, |
| rtc::PacketSocketFactory* factory, |
| @@ -217,6 +225,7 @@ class UDPPort : public Port { |
| rtc::scoped_ptr<AddressResolver> resolver_; |
| bool ready_; |
| int stun_keepalive_delay_; |
| + int stun_keepalive_lifetime_; |
| // This is true by default and false when |
| // PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE is specified. |