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

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

Issue 2093623004: Add config to prune TURN ports (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add all tests and fix a bug to set port type 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/portallocator.h
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
index 7d2a59f278ccb307ce0266ef89f65234eb291768..7381b15b84b9c57a1aea97bcf7ddcfd3f35d9e7e 100644
--- a/webrtc/p2p/base/portallocator.h
+++ b/webrtc/p2p/base/portallocator.h
@@ -178,6 +178,7 @@ class PortAllocatorSession : public sigslot::has_slots<> {
sigslot::signal2<PortAllocatorSession*,
const std::vector<Candidate>&> SignalCandidatesReady;
sigslot::signal1<PortAllocatorSession*> SignalCandidatesAllocationDone;
+ sigslot::signal2<PortAllocatorSession*, PortInterface*> SignalPortDeprecated;
pthatcher1 2016/06/27 20:35:54 Can you comment on what it means for a port to be
honghaiz3 2016/06/28 01:49:25 Done.
virtual uint32_t generation() { return generation_; }
virtual void set_generation(uint32_t generation) { generation_ = generation; }
@@ -246,7 +247,8 @@ class PortAllocator : public sigslot::has_slots<> {
// pooled sessions will be either created or destroyed as necessary.
void SetConfiguration(const ServerAddresses& stun_servers,
const std::vector<RelayServerConfig>& turn_servers,
- int candidate_pool_size);
+ int candidate_pool_size,
+ bool disable_low_priority_turn_ports);
pthatcher1 2016/06/27 20:35:54 Can you comment on what it means to be "low priori
honghaiz3 2016/06/28 01:49:25 Changed to prune_turn_ports and used SignalPortPru
const ServerAddresses& stun_servers() const { return stun_servers_; }
@@ -320,6 +322,10 @@ class PortAllocator : public sigslot::has_slots<> {
candidate_filter_ = filter;
}
+ bool disable_low_priority_turn_ports() const {
+ return disable_low_priority_turn_ports_;
+ }
+
// Gets/Sets the Origin value used for WebRTC STUN requests.
const std::string& origin() const { return origin_; }
void set_origin(const std::string& origin) { origin_ = origin; }
@@ -350,6 +356,7 @@ class PortAllocator : public sigslot::has_slots<> {
// both owned by this class and taken by TakePooledSession.
int allocated_pooled_session_count_ = 0;
std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_;
+ bool disable_low_priority_turn_ports_;
};
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698