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

Side by Side Diff: webrtc/base/network.h

Issue 1737493004: Keep on sending stun binding requests on zero-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added tests, chaneged to 64bit lifetime. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/stunport.h » ('j') | webrtc/p2p/base/stunport.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // Should only be relevant for link-local IPv6 addresses. 330 // Should only be relevant for link-local IPv6 addresses.
331 int scope_id() const { return scope_id_; } 331 int scope_id() const { return scope_id_; }
332 void set_scope_id(int id) { scope_id_ = id; } 332 void set_scope_id(int id) { scope_id_ = id; }
333 333
334 // Indicates whether this network should be ignored, perhaps because 334 // Indicates whether this network should be ignored, perhaps because
335 // the IP is 0, or the interface is one we know is invalid. 335 // the IP is 0, or the interface is one we know is invalid.
336 bool ignored() const { return ignored_; } 336 bool ignored() const { return ignored_; }
337 void set_ignored(bool ignored) { ignored_ = ignored; } 337 void set_ignored(bool ignored) { ignored_ = ignored; }
338 338
339 AdapterType type() const { return type_; } 339 AdapterType type() const { return type_; }
340 void set_type(AdapterType type) { type_ = type; }
341
340 int preference() const { return preference_; } 342 int preference() const { return preference_; }
341 void set_preference(int preference) { preference_ = preference; } 343 void set_preference(int preference) { preference_ = preference; }
342 344
343 // When we enumerate networks and find a previously-seen network is missing, 345 // When we enumerate networks and find a previously-seen network is missing,
344 // we do not remove it (because it may be used elsewhere). Instead, we mark 346 // we do not remove it (because it may be used elsewhere). Instead, we mark
345 // it inactive, so that we can detect network changes properly. 347 // it inactive, so that we can detect network changes properly.
346 bool active() const { return active_; } 348 bool active() const { return active_; }
347 void set_active(bool active) { 349 void set_active(bool active) {
348 if (active_ == active) { 350 if (active_ == active) {
349 return; 351 return;
(...skipping 20 matching lines...) Expand all
370 AdapterType type_; 372 AdapterType type_;
371 int preference_; 373 int preference_;
372 bool active_ = true; 374 bool active_ = true;
373 375
374 friend class NetworkManager; 376 friend class NetworkManager;
375 }; 377 };
376 378
377 } // namespace rtc 379 } // namespace rtc
378 380
379 #endif // WEBRTC_BASE_NETWORK_H_ 381 #endif // WEBRTC_BASE_NETWORK_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/stunport.h » ('j') | webrtc/p2p/base/stunport.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698