Class HostConfig
Holds configuration values for hosts.
Inheritance
Namespace: SuperNet.Netcode.Transport
Assembly: cs.temp.dll.dll
Syntax
public class HostConfig
Fields
AllocatorCount
Number of pooled arrays.
Declaration
public int AllocatorCount
Field Value
Type | Description |
---|---|
System.Int32 |
AllocatorExpandLength
Number of bytes to add when a non-pooled array becomes too small
Declaration
public int AllocatorExpandLength
Field Value
Type | Description |
---|---|
System.Int32 |
AllocatorMaxLength
Maximum length of allocated arrays.
Declaration
public int AllocatorMaxLength
Field Value
Type | Description |
---|---|
System.Int32 |
AllocatorPooledExpandLength
Number of bytes to add when a pooled array becomes too small.
Declaration
public int AllocatorPooledExpandLength
Field Value
Type | Description |
---|---|
System.Int32 |
AllocatorPooledLength
Maximum length an array can still be to be pooled.
Declaration
public int AllocatorPooledLength
Field Value
Type | Description |
---|---|
System.Int32 |
BindAddress
Bind socket to a specific address or null for any.
Declaration
public IPAddress BindAddress
Field Value
Type | Description |
---|---|
IPAddress |
Broadcast
Set Socket.EnableBroadcast
when creating a socket.
If true, allow broadcast messages to be sent.
Declaration
public bool Broadcast
Field Value
Type | Description |
---|---|
System.Boolean |
Compression
Enable compression of outgoing network packets.
If false and a compressed packet is received, it is still decompressed.
Declaration
public bool Compression
Field Value
Type | Description |
---|---|
System.Boolean |
CRC32
Enable CRC32 error checking to make sure packets don't get corrupted in transit.
If false and a CRC32 code is received, it is ignored.
Declaration
public bool CRC32
Field Value
Type | Description |
---|---|
System.Boolean |
DualMode
Set Socket.DualMode
when creating a socket.
If true, accept both IPv6 and IPv4 connections.
Declaration
public bool DualMode
Field Value
Type | Description |
---|---|
System.Boolean |
Encryption
Enable end to end encryption between peers.
A connection request without encryption can still be accepted.
Declaration
public bool Encryption
Field Value
Type | Description |
---|---|
System.Boolean |
Port
UDP port to listen on or zero for random.
Must be between 0 and 65536.
Declaration
public int Port
Field Value
Type | Description |
---|---|
System.Int32 |
PrivateKey
Private key to use when authenticating this host.
If null, this host cannot be authenticated.
Declaration
public string PrivateKey
Field Value
Type | Description |
---|---|
System.String |
ReceiveBufferSize
Set Socket.ReceiveBufferSize
when creating a socket.
Maximum socket receive buffer in bytes.
Declaration
public int ReceiveBufferSize
Field Value
Type | Description |
---|---|
System.Int32 |
ReceiveCount
Maximum number of possible concurrent read operations.
Declaration
public int ReceiveCount
Field Value
Type | Description |
---|---|
System.Int32 |
ReceiveMTU
Maximum number of bytes in a single received UDP packet.
This is used to allocate appropriately sized receive buffers.
Declaration
public int ReceiveMTU
Field Value
Type | Description |
---|---|
System.Int32 |
SendBufferSize
Set Socket.SendBufferSize
when creating a socket.
Maximum socket send buffer in bytes.
Declaration
public int SendBufferSize
Field Value
Type | Description |
---|---|
System.Int32 |
SimulatorEnabled
Enable latency and packet loss simulation.
Declaration
public bool SimulatorEnabled
Field Value
Type | Description |
---|---|
System.Boolean |
SimulatorIncomingJitter
Randomly added delay in milliseconds when receiving packets.
Making this non-zero can scramble the order of packets.
Declaration
public float SimulatorIncomingJitter
Field Value
Type | Description |
---|---|
System.Single |
SimulatorIncomingLatency
Simulated delay in milliseconds when receiving packets.
Declaration
public float SimulatorIncomingLatency
Field Value
Type | Description |
---|---|
System.Single |
SimulatorIncomingLoss
Simulated packet loss % when receiving. Must be between 0 and 1.
Value of 0 means no packet loss, value of 1 means all packets are dropped.
Declaration
public float SimulatorIncomingLoss
Field Value
Type | Description |
---|---|
System.Single |
SimulatorOutgoingJitter
Randomly added delay in milliseconds when sending packets.
Making this non-zero can scramble the order of packets.
Declaration
public float SimulatorOutgoingJitter
Field Value
Type | Description |
---|---|
System.Single |
SimulatorOutgoingLatency
Simulated delay in milliseconds when sending packets.
Declaration
public float SimulatorOutgoingLatency
Field Value
Type | Description |
---|---|
System.Single |
SimulatorOutgoingLoss
Simulated packet loss % when sending. Must be between 0 and 1.
Value of 0 means no packet loss, value of 1 means all packets are dropped.
Declaration
public float SimulatorOutgoingLoss
Field Value
Type | Description |
---|---|
System.Single |
TTL
Set Socket.Ttl
when creating a socket.
Maximum number of hops packets can take before being dropped.
Declaration
public short TTL
Field Value
Type | Description |
---|---|
System.Int16 |