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

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

Issue 2025573002: Use continual gathering to restore backup connections (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 6 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
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() {}
};

Powered by Google App Engine
This is Rietveld 408576698