Skip to main content
Version: 5.x

DarkWS.Client.DarkWsClientOptions

DarkWS.Client​

DarkWS.Client​

DarkWsClientOptions Class​

Settings captured when a client is constructed.

public sealed class DarkWsClientOptions

Inheritance System.Object → DarkWsClientOptions

Properties​

DarkWsClientOptions.AuthenticationTokenProvider Property​

Gets a nonempty token for acknowledged authentication on each connection. Must honor cancellation.

public System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<string?>>? AuthenticationTokenProvider { get; set; }

Property Value​

System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.String>>

DarkWsClientOptions.CloseTimeout Property​

Maximum graceful close duration. Default: five seconds.

public System.TimeSpan CloseTimeout { get; set; }

Property Value​

System.TimeSpan

DarkWsClientOptions.ConfigureWebSocketOptionsAsync Property​

Configures each fresh socket before connecting. Must honor cancellation.

public System.Func<System.Net.WebSockets.ClientWebSocketOptions,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask>? ConfigureWebSocketOptionsAsync { get; set; }

Property Value​

System.Func<System.Net.WebSockets.ClientWebSocketOptions,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask>

DarkWsClientOptions.ConnectionTimeout Property​

Maximum connection attempt and connection wait duration. Default: 30 seconds.

public System.TimeSpan ConnectionTimeout { get; set; }

Property Value​

System.TimeSpan

DarkWsClientOptions.Endpoint Property​

Absolute ws or wss endpoint, without user information or a fragment.

public System.Uri Endpoint { get; set; }

Property Value​

System.Uri

DarkWsClientOptions.JsonOptions Property​

Payload and result serializer options. The client takes a copy. Default: Web defaults.

public System.Text.Json.JsonSerializerOptions JsonOptions { get; set; }

Property Value​

System.Text.Json.JsonSerializerOptions

DarkWsClientOptions.MaxMessageSizeBytes Property​

Maximum incoming message size, including all fragments. Default: 1 MiB.

public int MaxMessageSizeBytes { get; set; }

Property Value​

System.Int32

DarkWsClientOptions.MaxPendingRequests Property​

Maximum application requests, including connection waits. Default: 256.

public int MaxPendingRequests { get; set; }

Property Value​

System.Int32

DarkWsClientOptions.NotificationQueueCapacity Property​

Maximum queued broadcasts, and maximum Error events waiting for slow handlers; further errors are dropped. Default: 256.

public int NotificationQueueCapacity { get; set; }

Property Value​

System.Int32

DarkWsClientOptions.PingInterval Property​

Interval before sending a text ping. Default: 30 seconds.

public System.TimeSpan PingInterval { get; set; }

Property Value​

System.TimeSpan

DarkWsClientOptions.PongTimeout Property​

Maximum pong wait after writing a ping. Default: 30 seconds.

public System.TimeSpan PongTimeout { get; set; }

Property Value​

System.TimeSpan

DarkWsClientOptions.Reconnect Property​

Whether transport failures trigger reconnect. Default: true.

public bool Reconnect { get; set; }

Property Value​

System.Boolean

DarkWsClientOptions.RequestTimeout Property​

Response timeout after sending. Default: five minutes; InfiniteTimeSpan disables expiry.

public System.TimeSpan RequestTimeout { get; set; }

Property Value​

System.TimeSpan

DarkWsClientOptions.SendTimeout Property​

Maximum send queue and write duration. Default: 30 seconds.

public System.TimeSpan SendTimeout { get; set; }

Property Value​

System.TimeSpan