NetworkingSettings
A class in Root.Township, Alta.Networking.
Global networking settings: transport (KCP) settings, channels and send and receive limits.
- Listed in Networking and servers
- Inherits or implements
GlobalSettings<NetworkingSettings> - Derived types
NetworkingSettings,NetworkingSettings.Create - Nested types
Create - Attributes
GlobalSettings
Constructors
| Member | What it is |
|---|---|
NetworkingSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
13 private and internal fields
| Member | What it is |
|---|---|
private ConnectionChannel[] channels | Backing field for Channels, the connection channels. |
private ConnectionConfig connectionConfiguration | Backing field for ConnectionConfiguration. |
private TransportSystem currentTransportSystem | Transport chosen by SetTransportSystem. |
private ConnectionChannel defaultChannel | Backing field for DefaultChannel. |
private readonly TransportSystem defaultNetworkTransport | Transport used when the server info has no override: KCP. |
private KcpSettings kcpSettings | Backing field for KcpSettings. |
private static Logger Logger | Logger for transport selection messages. |
private uint maxBitsPerSerializationMessage | Bit limit for one entity sync message (default 1300); SceneSerializer stops adding entities past it. |
private int maxConnectionQueueSize | Outgoing queue size per connection above which further packets are held back for the frame. |
private int maxServerQueueSize | Outgoing queue size for the whole socket above which packets are held back for the frame. |
private int maxUnreliableReceivedPerFrame | Size of the server's per-connection unreliable buffer (default 100); older unreliable packets in a frame are dropped. |
private GlobalConfig networkConfiguration | Backing field for NetworkConfiguration. |
private bool simulateNoInternetInEditor | Editor only: makes SimulateNoInternet true. |
Properties
| Member | What it is |
|---|---|
ConnectionChannel[] Channels { get; } | All channels to create on the transport. |
ConnectionConfig ConnectionConfiguration { get; } | Unity network connection config. Its channel list is cleared on start. |
ConnectionChannel DefaultChannel { get; } | Channel used when none is given. |
KcpSettings KcpSettings { get; } | Settings for the KCP transport. |
uint MaxBitsPerSerializationMessage { get; } | Size limit for one entity serialization message, in bits. 1300 by default. |
int MaxConnectionQueueSize { get; } | Outgoing queue size per connection at which sends start being dropped. |
int MaxServerQueueSize { get; } | Outgoing queue size across the socket at which sends start being dropped. |
int MaxUnreliableReceivedPerFrame { get; } | Most unreliable messages the server handles per connection each frame. 100 by default. |
GlobalConfig NetworkConfiguration { get; } | Unity network global config (older UNET settings). |
bool SimulateNoInternet { get; } | Editor only: pretend there's no internet. |
TransportSystem TransportSystem { get; } | The transport chosen for this run. |
Methods
| Member | What it is |
|---|---|
TransportSystem GetTransportSystem(GameServerInfo serverInfo) | The transport a server asks for, or KCP if it doesn't say. |
void SetTransportSystem(TransportSystem transport) | Sets the transport for this run and logs it. |
Used in
Members of other types that take, return or hold a NetworkingSettings: