blob: 8b1089ab729e5bf6dac13ce930c7a6206aa76c87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef REMOTING_PROTOCOL_TRANSPORT_CONFIG_H_
#define REMOTING_PROTOCOL_TRANSPORT_CONFIG_H_
#include <string>
namespace remoting {
namespace protocol {
struct TransportConfig {
TransportConfig();
~TransportConfig();
enum NatTraversalMode {
// Don't use STUN or relay servers. Accept incoming P2P connection
// attempts, but don't initiate any. This ensures that the peer is
// on the same network. Note that connection will always fail if
// both ends use this mode.
NAT_TRAVERSAL_DISABLED,
// Don't use STUN or relay servers but make outgoing connections.
NAT_TRAVERSAL_OUTGOING,
// Active NAT traversal using STUN and relay servers.
NAT_TRAVERSAL_ENABLED,
};
NatTraversalMode nat_traversal_mode;
std::string stun_server;
std::string relay_server;
std::string relay_token;
// |min_port| and |max_port| specify range (inclusive) of ports used by
// P2P sessions. Any port can be used when both values are set to 0.
int min_port;
int max_port;
};
} // namespace protocol
} // namespace remoting
#endif // REMOTING_PROTOCOL_TRANSPORT_CONFIG_H_
|