Index: webrtc/p2p/base/turnport.h |
diff --git a/webrtc/p2p/base/turnport.h b/webrtc/p2p/base/turnport.h |
index 4d83806a37126f96fad74abc83f942d494b79630..af49dc6c880eeabb3a62b50165928b74bf8a68fe 100644 |
--- a/webrtc/p2p/base/turnport.h |
+++ b/webrtc/p2p/base/turnport.h |
@@ -152,6 +152,10 @@ class TurnPort : public Port { |
// Returns true if the entry is found. |
bool SetEntryChannelId(const rtc::SocketAddress& address, int channel_id); |
+ // For testing only. |
+ void set_nonce(const std::string& nonce) { nonce_ = nonce; } |
+ void set_hash(const std::string& hash) { hash_ = hash; } |
+ |
protected: |
TurnPort(rtc::Thread* thread, |
rtc::PacketSocketFactory* factory, |
@@ -192,8 +196,6 @@ class TurnPort : public Port { |
virtual void OnMessage(rtc::Message* pmsg); |
bool CreateTurnClientSocket(); |
- |
- void set_nonce(const std::string& nonce) { nonce_ = nonce; } |
void set_realm(const std::string& realm) { |
if (realm != realm_) { |
realm_ = realm; |
@@ -232,6 +234,7 @@ class TurnPort : public Port { |
const rtc::PacketOptions& options); |
void UpdateHash(); |
bool UpdateNonce(StunMessage* response); |
+ void ResetNonce(); |
bool HasPermission(const rtc::IPAddress& ipaddr) const; |
TurnEntry* FindEntry(const rtc::SocketAddress& address) const; |