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

Side by Side Diff: remoting/protocol/network_settings.h

Issue 1687543002: Fix IceTransportTest.TestBrokenTransport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « remoting/protocol/ice_transport_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_NETWORK_SETTINGS_H_ 5 #ifndef REMOTING_PROTOCOL_NETWORK_SETTINGS_H_
6 #define REMOTING_PROTOCOL_NETWORK_SETTINGS_H_ 6 #define REMOTING_PROTOCOL_NETWORK_SETTINGS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/time/time.h"
13 #include "remoting/protocol/port_range.h" 14 #include "remoting/protocol/port_range.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 namespace protocol { 17 namespace protocol {
17 18
18 struct NetworkSettings { 19 struct NetworkSettings {
19 20
20 // When hosts are configured with NAT traversal disabled they will 21 // When hosts are configured with NAT traversal disabled they will
21 // typically also limit their P2P ports to this range, so that 22 // typically also limit their P2P ports to this range, so that
22 // sessions may be blocked or un-blocked via firewall rules. 23 // sessions may be blocked or un-blocked via firewall rules.
(...skipping 14 matching lines...) Expand all
37 NAT_TRAVERSAL_STUN = 0x2, 38 NAT_TRAVERSAL_STUN = 0x2,
38 39
39 // Allow the use of relay servers when a direct connection is not available. 40 // Allow the use of relay servers when a direct connection is not available.
40 NAT_TRAVERSAL_RELAY = 0x4, 41 NAT_TRAVERSAL_RELAY = 0x4,
41 42
42 // Active NAT traversal using STUN and relay servers. 43 // Active NAT traversal using STUN and relay servers.
43 NAT_TRAVERSAL_FULL = NAT_TRAVERSAL_STUN | NAT_TRAVERSAL_RELAY | 44 NAT_TRAVERSAL_FULL = NAT_TRAVERSAL_STUN | NAT_TRAVERSAL_RELAY |
44 NAT_TRAVERSAL_OUTGOING 45 NAT_TRAVERSAL_OUTGOING
45 }; 46 };
46 47
47 NetworkSettings() : flags(NAT_TRAVERSAL_DISABLED) { 48 NetworkSettings() {}
48 DCHECK(!(flags & (NAT_TRAVERSAL_STUN | NAT_TRAVERSAL_RELAY)) ||
49 (flags & NAT_TRAVERSAL_OUTGOING));
50 }
51 49
52 explicit NetworkSettings(uint32_t flags) : flags(flags) {} 50 explicit NetworkSettings(uint32_t flags) : flags(flags) {}
53 51
54 uint32_t flags; 52 uint32_t flags = NAT_TRAVERSAL_DISABLED;
55 53
56 // Range of ports used by P2P sessions. 54 // Range of ports used by P2P sessions.
57 PortRange port_range; 55 PortRange port_range;
56
57 // ICE Timeout.
58 base::TimeDelta ice_timeout = base::TimeDelta::FromSeconds(15);
59
60 // ICE reconnect attempts.
61 int ice_reconnect_attempts = 2;
58 }; 62 };
59 63
60 } // namespace protocol 64 } // namespace protocol
61 } // namespace remoting 65 } // namespace remoting
62 66
63 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_ 67 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_
OLDNEW
« no previous file with comments | « remoting/protocol/ice_transport_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698