Index: webrtc/p2p/base/portinterface.h |
diff --git a/webrtc/p2p/base/portinterface.h b/webrtc/p2p/base/portinterface.h |
index e73861965e538e0ab8e09907d56b63241547c4b7..ef4f8af17faa0cd765bf2a11b587235f65d07658 100644 |
--- a/webrtc/p2p/base/portinterface.h |
+++ b/webrtc/p2p/base/portinterface.h |
@@ -78,6 +78,11 @@ class PortInterface { |
virtual const std::vector<Candidate>& Candidates() const = 0; |
+ // A port is closed when it is not actively used. A closed port will not be |
+ // used to create connections except when it receives stun requests from |
+ // unknown addresses, although the connections on it may still be used. |
+ virtual void Close() = 0; |
+ |
// Sends the given packet to the given address, provided that the address is |
// that of a connection or an address that has sent to us already. |
virtual int SendTo(const void* data, size_t size, |
@@ -104,8 +109,9 @@ class PortInterface { |
// any usefulness. |
sigslot::signal1<PortInterface*> SignalDestroyed; |
- // Signaled when the network used by this port becomes inactive. |
- sigslot::signal1<PortInterface*> SignalNetworkInactive; |
+ // A closed port will not be used to create new connections except when |
+ // receiving stun ping from unknown address. |
+ sigslot::signal1<PortInterface*> SignalClosed; |
// Signaled when Port discovers ice role conflict with the peer. |
sigslot::signal1<PortInterface*> SignalRoleConflict; |
@@ -123,6 +129,8 @@ class PortInterface { |
virtual std::string ToString() const = 0; |
+ virtual void FailAndDestroyConnections() = 0; |
+ |
protected: |
PortInterface() {} |
}; |