Table of Contents

Class ProtocolOptions

Namespace
Backdash.Network.Protocol
Assembly
Backdash.dll

Network protocol configuration.

public class ProtocolOptions
Inheritance
ProtocolOptions
Inherited Members

Constructors

ProtocolOptions()

public ProtocolOptions()

Properties

DelayStrategy

Strategy for applying delay to sending packages, forcing latency. When NetworkLatency is Zero this is ignored.

public DelayStrategy DelayStrategy { get; init; }

Property Value

DelayStrategy

Defaults to Gaussian

See Also

DisconnectNotifyStart

The time to wait before the first ConnectionInterrupted timeout will be sent.

public TimeSpan DisconnectNotifyStart { get; init; }

Property Value

TimeSpan

Defaults to 750 milliseconds

DisconnectTimeout

The session will automatically disconnect from a remote peer if it has not received a packet in the timeout window. You will be notified of the disconnect via Disconnected event.

public TimeSpan DisconnectTimeout { get; init; }

Property Value

TimeSpan

Defaults to 5_000 milliseconds

KeepAliveInterval

When the time from the last send package until now is greater then this, sends a keep alive packets.

public TimeSpan KeepAliveInterval { get; init; }

Property Value

TimeSpan

Defaults to 200 milliseconds

LogNetworkStats

When true, session log network stats periodically.

public bool LogNetworkStats { get; init; }

Property Value

bool

Defaults to

MaxPackageQueue

Max allowed pending UDP output messages. When reached removes and ignores the oldest package in the queue in order to make room for the new package.

public int MaxPackageQueue { get; init; }

Property Value

int

Defaults to 64

MaxPendingInputs

Max allowed pending inputs in sending queue. When reached AddLocalInput(PlayerHandle, TInput) returns InputDropped.

public int MaxPendingInputs { get; init; }

Property Value

int

Defaults to 64

MaxSequenceDistance

Distance to check out of order packets.

public int MaxSequenceDistance { get; init; }

Property Value

int

Defaults to 32_768

MaxSyncRetries

Total number of synchronization request retries. When reached, session will dispatch the SynchronizationFailure event.

public int MaxSyncRetries { get; init; }

Property Value

int

Defaults to 64

NetworkLatency

Forced network packet sending latency for the current peer. This value is processed using DelayStrategy.

public TimeSpan NetworkLatency { get; init; }

Property Value

TimeSpan

Defaults to Zero

See Also

NetworkStatsInterval

The time to wait before recalculate network statistics.

public TimeSpan NetworkStatsInterval { get; init; }

Property Value

TimeSpan

Defaults to 1000 milliseconds

See Also

NumberOfSyncRoundtrips

Number of synchronization roundtrips to consider two clients synchronized.

public int NumberOfSyncRoundtrips { get; init; }

Property Value

int

Defaults to 10

QualityReportInterval

The time to wait before send the next quality report package (determines ping).

public TimeSpan QualityReportInterval { get; init; }

Property Value

TimeSpan

Defaults to 1000 milliseconds

ResendInputInterval

When the time from the last send input until now is greater then this, resends pending inputs.

public TimeSpan ResendInputInterval { get; init; }

Property Value

TimeSpan

Defaults to 200 milliseconds

ShutdownTime

The time to wait before end the session.

public TimeSpan ShutdownTime { get; init; }

Property Value

TimeSpan

Defaults to 100 milliseconds

SyncFirstRetryInterval

The time to wait before resend the first synchronization request retry.

public TimeSpan SyncFirstRetryInterval { get; init; }

Property Value

TimeSpan

Defaults to 500 milliseconds

See Also

SyncRetryInterval

The time to wait before resend synchronization retries after the first.

public TimeSpan SyncRetryInterval { get; init; }

Property Value

TimeSpan

Defaults to 1000 milliseconds

See Also

UdpPacketBufferSize

Number of bytes used on the UdpSocket message buffer.

public int UdpPacketBufferSize { get; init; }

Property Value

int

Defaults to 4096