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

Unified Diff: webrtc/p2p/client/basicportallocator.h

Issue 2025573002: Use continual gathering to restore backup connections (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add tests 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/client/basicportallocator.h
diff --git a/webrtc/p2p/client/basicportallocator.h b/webrtc/p2p/client/basicportallocator.h
index 8ea66c431e76d560a6299c2831d77a1a83dfeb06..61a3360dcc9245761470e1e3a723edf73e348a15 100644
--- a/webrtc/p2p/client/basicportallocator.h
+++ b/webrtc/p2p/client/basicportallocator.h
@@ -45,9 +45,13 @@ class BasicPortAllocator : public PortAllocator {
network_ignore_mask_ = network_ignore_mask;
}
+ void GetNetworks(std::vector<rtc::Network*>* networks) const override {
Taylor Brandstetter 2016/06/06 18:18:37 Instead of going through BasicPortAllocator, P2PTr
honghaiz3 2016/06/07 16:42:06 Done.
+ network_manager()->GetNetworks(networks);
+ }
+
int network_ignore_mask() const { return network_ignore_mask_; }
- rtc::NetworkManager* network_manager() { return network_manager_; }
+ rtc::NetworkManager* network_manager() const { return network_manager_; }
// If socket_factory() is set to NULL each PortAllocatorSession
// creates its own socket factory.
@@ -89,6 +93,7 @@ class BasicPortAllocatorSession : public PortAllocatorSession,
rtc::PacketSocketFactory* socket_factory() { return socket_factory_; }
void SetCandidateFilter(uint32_t filter) override;
+
void StartGettingPorts() override;
void StopGettingPorts() override;
void ClearGettingPorts() override;
@@ -97,6 +102,8 @@ class BasicPortAllocatorSession : public PortAllocatorSession,
std::vector<PortInterface*> ReadyPorts() const override;
std::vector<Candidate> ReadyCandidates() const override;
bool CandidatesAllocationDone() const override;
+ void InactivateNetworksInExistingSequences(
+ std::vector<rtc::Network*>* networks) override;
protected:
void UpdateIceParametersInternal() override;
@@ -255,11 +262,15 @@ class AllocationSequence : public rtc::MessageHandler,
~AllocationSequence();
bool Init();
void Clear();
- void OnNetworkRemoved();
+ void OnNetworkInactivated();
State state() const { return state_; }
const rtc::Network* network() const { return network_; }
- bool network_removed() const { return network_removed_; }
+
+ bool network_inactive() const { return network_inactive_; }
+ void set_network_inactive(bool network_inactive) {
+ network_inactive_ = network_inactive;
+ }
// Disables the phases for a new sequence that this one already covers for an
// equivalent network setup.
@@ -309,7 +320,7 @@ class AllocationSequence : public rtc::MessageHandler,
void OnPortDestroyed(PortInterface* port);
BasicPortAllocatorSession* session_;
- bool network_removed_ = false;
+ bool network_inactive_ = false;
rtc::Network* network_;
rtc::IPAddress ip_;
PortConfiguration* config_;

Powered by Google App Engine
This is Rietveld 408576698