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

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

Issue 1737493004: Keep on sending stun binding requests on zero-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change back to uint32_t timestamp Created 4 years, 10 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
« no previous file with comments | « webrtc/base/network.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stunport.h
diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h
index ecf61a782dfc13ad2d3e64df48dbaa45c5c51324..a0eba51cd43caabc057ad4518cadda70bff3a18a 100644
--- a/webrtc/p2p/base/stunport.h
+++ b/webrtc/p2p/base/stunport.h
@@ -106,6 +106,16 @@ 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 HasPendingRequest(int msg_type) {
+ return requests_.HasRequest(msg_type);
+ }
+
protected:
UDPPort(rtc::Thread* thread,
rtc::PacketSocketFactory* factory,
@@ -217,6 +227,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.
« no previous file with comments | « webrtc/base/network.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698