Index: webrtc/p2p/base/turnport.h |
diff --git a/webrtc/p2p/base/turnport.h b/webrtc/p2p/base/turnport.h |
index 17d2d45181930bcc1ce9bb8ba8a75b0cf03225d4..dbd84e9af663a56be852a4755094d1b8050be39d 100644 |
--- a/webrtc/p2p/base/turnport.h |
+++ b/webrtc/p2p/base/turnport.h |
@@ -38,7 +38,9 @@ class TurnPort : public Port { |
STATE_CONNECTING, // Initial state, cannot send any packets. |
STATE_CONNECTED, // Socket connected, ready to send stun requests. |
STATE_READY, // Received allocate success, can send any packets. |
- STATE_DISCONNECTED, // TCP connection died, cannot send any packets. |
+ STATE_RECEIVEONLY, // Had REFRESH_REQUEST error, cannot send any packets. |
+ STATE_DISCONNECTED, // TCP connection died, cannot send/receive any |
+ // packets. |
}; |
static TurnPort* Create(rtc::Thread* thread, |
rtc::PacketSocketFactory* factory, |
@@ -202,7 +204,8 @@ class TurnPort : public Port { |
} |
} |
- void OnTurnRefreshError(); |
+ void OnRefreshError(); |
+ void handleRefreshError(); |
Taylor Brandstetter
2016/06/22 16:49:54
Nit: why handleRefreshError and not HandleRefreshE
honghaiz3
2016/06/22 18:01:48
Done.
|
bool SetAlternateServer(const rtc::SocketAddress& address); |
void ResolveTurnAddress(const rtc::SocketAddress& address); |
void OnResolveResult(rtc::AsyncResolverInterface* resolver); |
@@ -245,9 +248,9 @@ class TurnPort : public Port { |
void ScheduleEntryDestruction(TurnEntry* entry); |
void CancelEntryDestruction(TurnEntry* entry); |
- // Destroys the connection with remote address |address|. Returns true if |
- // a connection is found and destroyed. |
- bool DestroyConnection(const rtc::SocketAddress& address); |
+ // Marks the connection with remote address |address| failed and |
+ // pruned (a.k.a. write-timed-out). Returns true if a connection is found. |
+ bool FailAndPruneConnection(const rtc::SocketAddress& address); |
ProtocolAddress server_address_; |
RelayCredentials credentials_; |