• Home
  • Tutorials
  • API Documentation
  • Asset Store
Show / Hide Table of Contents
  • SuperNet.Netcode.Compress
    • CompressorDeflate
    • CompressorLZF
    • ICompressor
  • SuperNet.Netcode.Crypto
    • CryptoAES
    • CryptoECDH
    • CryptoRandom
    • CryptoRSA
    • Curve25519
    • ICryptoAuthenticator
    • ICryptoEncryptor
    • ICryptoExchanger
    • ICryptoRandom
  • SuperNet.Netcode.Transport
    • ConnectionRequest
    • DisconnectReason
    • Host
    • HostConfig
    • HostEvents
    • HostStatistics
    • HostTimespan
    • HostTimestamp
    • IHostListener
    • IMessage
    • IMessageListener
    • IPeerListener
    • MessageEvents
    • MessageReceived
    • MessageSent
    • Peer
    • PeerConfig
    • PeerEvents
    • PeerStatistics
  • SuperNet.Netcode.Util
    • Allocator
    • ArrayPool<T>
    • CRC32
    • IPComparer
    • IPResolver
    • IWritable
    • ObjectPool<T>
    • Reader
    • Serializer
    • Writer
  • SuperNet.Unity.Components
    • INetworkAuthoritative
    • INetworkRegisterable
    • INetworkRollbackable
    • NetworkAnimation
    • NetworkAnimator
    • NetworkAuthority
    • NetworkPrefab
    • NetworkRegistrar
    • NetworkSpawner
    • NetworkSyncModeMethod
    • NetworkSyncModeVector2
    • NetworkSyncModeVector3
    • NetworkTransform
  • SuperNet.Unity.Core
    • NetworkComponent
    • NetworkHost
    • NetworkIdentity
    • NetworkIdentityExtensions
    • NetworkManager
  • SuperNet.Unity.Editor
    • NetworkAuthorityEditor
    • NetworkHostEditor
    • NetworkHostEditor.BandwithUnit
    • NetworkIdentityDrawer
    • NetworkManagerEditor
    • NetworkPrefabEditor
    • NetworkSpawnerEditor

Class PeerConfig

Holds configuration values for peers.

Inheritance
System.Object
PeerConfig
Namespace: SuperNet.Netcode.Transport
Assembly: cs.temp.dll.dll
Syntax
public class PeerConfig

Fields

ConnectAttempts

Number of connection requests to send before giving up. This is a high number to allow enough time for UDP hole punching.

Declaration
public int ConnectAttempts
Field Value
Type Description
System.Int32

ConnectDelay

Delay in milliseconds between connection requests.

Declaration
public int ConnectDelay
Field Value
Type Description
System.Int32

DisconnectDelay

Number of milliseconds to delay closing the connection when a disconnect request is received.

This is useful in cases where both peers disconnect at the same time. It is also useful for when a disconnect acknowledge gets lost. Set to zero to disable this delay.

Declaration
public int DisconnectDelay
Field Value
Type Description
System.Int32

DuplicateTimeout

How long in milliseconds to keep received reliable messages for. If the same reliable message is received during this timeout, it is ignored.

Declaration
public int DuplicateTimeout
Field Value
Type Description
System.Int32

FragmentTimeout

Timeout in milliseconds until a received incompleted fragmented packet times out.

Declaration
public int FragmentTimeout
Field Value
Type Description
System.Int32

MTU

Maximum bytes to send in one UDP packet.

MTU on ethernet is 1500 bytes - 20 bytes for IP header - 8 bytes for UDP header.

Declaration
public int MTU
Field Value
Type Description
System.Int32

OrderedDelayMax

Maximum number of messages to wait for before processing a reliable ordered message that came out of order.

If an ordered reliable message comes late, it is delayed until all missing messages are received. This value controls maximum number of missing messages to wait for. If this is zero, delaying is disabled.

Declaration
public int OrderedDelayMax
Field Value
Type Description
System.Int32

OrderedDelayTimeout

Maximum number of milliseconds to wait for before processing a reliable ordered message that came out of order.

If an ordered reliable message comes late, it is delayed until all missing messages are received. This controls maximum number of milliseconds to wait for. If this is zero, delaying is disabled.

Declaration
public int OrderedDelayTimeout
Field Value
Type Description
System.Int32

PingDelay

Delay in milliseconds between ping messages.

Declaration
public int PingDelay
Field Value
Type Description
System.Int32

RemotePublicKey

Remote public key to verify authentication signature against.

If provided and remote peer has authentication disabled, they will ignore connection requests.

Declaration
public string RemotePublicKey
Field Value
Type Description
System.String

ResendCount

Maximum number of times a reliable message is resent without being acknowledged before the connection times out.

Declaration
public byte ResendCount
Field Value
Type Description
System.Byte

ResendDelayJitter

Maximum number of milliseconds to wait before declaring a reliable message as lost.

When a reliable message is sent, peer waits RTT + ResendDelayJitter milliseconds for an acknowledgment. If no acknowledgment is received within that time, the message is resent. A small value can result in unnecessary duplicated messages wasting networking bandwidth.

Declaration
public int ResendDelayJitter
Field Value
Type Description
System.Int32

ResendDelayMax

Maximum delay in milliseconds before resending unacknowledged reliable messages.

Declaration
public int ResendDelayMax
Field Value
Type Description
System.Int32

ResendDelayMin

Minimum delay in milliseconds before resending unacknowledged reliable messages.

Declaration
public int ResendDelayMin
Field Value
Type Description
System.Int32

SendDelay

Delay in milliseconds before combining and sending messages to the socket.

Declaration
public int SendDelay
Field Value
Type Description
System.Int32

TimeStability

How fast the clock tick difference can change. Must be between 0 and 1.

Clock tick difference is an exponential moving average. If this value is 1, clock drifting is completely ignored once calculated. if this value is 0, latest calculated value is always used.

Declaration
public float TimeStability
Field Value
Type Description
System.Single

UnsequencedMax

Maximum number of consecutive unsequenced messages to send.

All reliable messages include a sequence number. Unreliable messages don't need a sequence number but can include it. This value controls how often to include a sequence number. Sending a sequence number every so often is important to check for lost messages.

Declaration
public int UnsequencedMax
Field Value
Type Description
System.Int32
Back to top Generated by DocFX