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

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

Issue 2171183002: Remove ports that are not used by any channel after timeout (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « webrtc/p2p/base/fakeportallocator.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index f363adc60087fad82667d848a4a91b09ea9abca9..6fafaa4c3ebdc1069ce39b8b1af1fad9631ed377 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -127,9 +127,10 @@ class P2PTransportChannel : public TransportChannelImpl,
const Connection* selected_connection() const { return selected_connection_; }
void set_incoming_only(bool value) { incoming_only_ = value; }
- // Note: This is only for testing purpose.
- // |ports_| should not be changed from outside.
+ // Note: These are only for testing purpose.
+ // |ports_| and |pruned_ports| should not be changed from outside.
const std::vector<PortInterface*>& ports() { return ports_; }
+ const std::vector<PortInterface*>& pruned_ports() { return pruned_ports_; }
IceMode remote_ice_mode() const { return remote_ice_mode_; }
@@ -184,6 +185,7 @@ class P2PTransportChannel : public TransportChannelImpl,
return false;
}
+ void PruneAllPorts();
int receiving_timeout() const { return config_.receiving_timeout; }
int check_receiving_interval() const { return check_receiving_interval_; }
@@ -295,7 +297,7 @@ class P2PTransportChannel : public TransportChannelImpl,
void OnPortDestroyed(PortInterface* port);
// When pruning a port, move it from |ports_| to |pruned_ports_|.
// Returns true if the port is found and removed from |ports_|.
- bool OnPortPruned(PortInterface* port);
+ bool PrunePort(PortInterface* port);
void OnRoleConflict(PortInterface* port);
void OnConnectionStateChange(Connection* connection);
« no previous file with comments | « webrtc/p2p/base/fakeportallocator.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698