Index: webrtc/p2p/base/turnport.h |
diff --git a/webrtc/p2p/base/turnport.h b/webrtc/p2p/base/turnport.h |
index db2a3ceeeec8ff7e127d12758c15a1c12b41cb8a..65fd29f155d54a54962472a94ee51f56be4695f7 100644 |
--- a/webrtc/p2p/base/turnport.h |
+++ b/webrtc/p2p/base/turnport.h |
@@ -133,11 +133,17 @@ class TurnPort : public Port { |
const rtc::SocketAddress&, |
const rtc::SocketAddress&> SignalResolvedServerAddress; |
- // This signal is only for testing purpose. |
+ // All public methods/signals below are for testing only. |
+ sigslot::signal2<TurnPort*, int> SignalTurnRefreshResult; |
sigslot::signal3<TurnPort*, const rtc::SocketAddress&, int> |
SignalCreatePermissionResult; |
- // For testing only. |
void FlushRequests() { request_manager_.Flush(); } |
+ void set_credentials(RelayCredentials& credentials) { |
+ credentials_ = credentials; |
+ } |
+ // Finds the turn entry with |address| and sets its channel id. |
+ // Returns true if the entry is found. |
+ bool SetEntryChannelId(const rtc::SocketAddress& address, int channel_id); |
protected: |
TurnPort(rtc::Thread* thread, |
@@ -166,7 +172,7 @@ class TurnPort : public Port { |
private: |
enum { |
- MSG_ERROR = MSG_FIRST_AVAILABLE, |
+ MSG_ALLOCATE_ERROR = MSG_FIRST_AVAILABLE, |
MSG_ALLOCATE_MISMATCH, |
MSG_TRY_ALTERNATE_SERVER |
}; |
@@ -187,6 +193,7 @@ class TurnPort : public Port { |
} |
} |
+ void OnTurnRefreshError(); |
bool SetAlternateServer(const rtc::SocketAddress& address); |
void ResolveTurnAddress(const rtc::SocketAddress& address); |
void OnResolveResult(rtc::AsyncResolverInterface* resolver); |
@@ -228,6 +235,9 @@ class TurnPort : public Port { |
void CancelEntryDestruction(TurnEntry* entry); |
void OnConnectionDestroyed(Connection* conn); |
+ // Destroys the connection with remote address |address|. |
+ void DestroyConnection(const rtc::SocketAddress& address); |
+ |
ProtocolAddress server_address_; |
RelayCredentials credentials_; |
AttemptedServerSet attempted_server_addresses_; |