-
Notifications
You must be signed in to change notification settings - Fork 1
/
NetworkConfiguration.cs
61 lines (52 loc) · 1.87 KB
/
NetworkConfiguration.cs
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RedGrin
{
public class NetworkConfiguration
{
/// <summary>
/// The name of the application employing the NetworkManager
/// </summary>
public string ApplicationName {get;set;}
/// <summary>
/// The port the application will attempt to connect on
/// </summary>
public int ApplicationPort { get; set; }
/// <summary>
/// How frequently the network should perform a dead reckoning.
/// If less than or equal to zero, dead reckoning will not happen
/// </summary>
public float DeadReckonSeconds { get; set; }
/// <summary>
/// A list of state types with a numerical index.
/// Using a list allows network to pass a very small
/// integer value describing message payload instead of
/// a fully-qualified type string.
///
/// NOTE: Every EntityState that will be transferred through the network
/// must be enumerated in the config.
/// </summary>
public List<Type> EntityStateTypes { get; set; }
#if DEBUG
/// <summary>
/// Simulated percentage of lost packets (0f - 1.0f)
/// </summary>
public float SimulatedLoss { get; set; }
/// <summary>
/// Simulated one-way latency for sent packets in seconds.
/// </summary>
public float SimulatedMinimumLatencySeconds { get; set; }
/// <summary>
/// Additional random latency in seconds.
/// </summary>
public float SimulatedRandomLatencySeconds { get; set; }
/// <summary>
/// Simulated percentage of duplicate packets (0f - 1.0f)
/// </summary>
public float SimulatedDuplicateChance { get; set; }
#endif
}
}