Class WsEndpointOptions

Assembly: redb.Route.WebSocket.dll

Options for the WebSocket endpoint. Shared by both producer and consumer.
URI format: ws:host:port/path?messageType=Text&subProtocol=graphql-ws

public class WsEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→WsEndpointOptions

Inherited Members

Properties

ConnectionFactory

Named from the route registry. Lets the TLS certificate

[RegistryReference(typeof(WsConnectionFactory))]
public string? ConnectionFactory { get; set; }

ConnectTimeout

Connect timeout in milliseconds. Default: 10000 (10s). 0 = infinite.

public int ConnectTimeout { get; set; }

Encoding

Text encoding name. Default: utf-8.

public string Encoding { get; set; }

Host

Host to connect or bind. Parsed from URI path.

public string Host { get; set; }

InOut

If true, the consumer returns the exchange Out body as a WebSocket response frame (InOut pattern).

public bool InOut { get; set; }

KeepAliveInterval

Keep-alive ping interval in milliseconds. 0 = disabled. Default: 30000 (30s).

public int KeepAliveInterval { get; set; }

MaxConnections

Maximum concurrent WebSocket connections. 0 = unlimited. Default: 0.

public int MaxConnections { get; set; }

MaxReconnectAttempts

Maximum reconnect attempts. 0 = unlimited. Default: 0.

public int MaxReconnectAttempts { get; set; }

MessageType

Default message type for outgoing frames. Default: Text.

public WsMessageType MessageType { get; set; }

Mode

Producer mode. Client (default) connects to a remote server with

public WsMode Mode { get; set; }

Port

Port number. Parsed from URI path.

public int Port { get; set; }

ReceiveBufferSize

Receive buffer size in bytes. Default: 8192.

public int ReceiveBufferSize { get; set; }

Reconnect

Auto-reconnect on disconnect. Default: false.

public bool Reconnect { get; set; }

ReconnectInterval

Interval between reconnect attempts in milliseconds. Default: 5000.

public int ReconnectInterval { get; set; }

ReconnectTimeout

Overall time budget for reconnecting, in milliseconds. 0 = no budget (default, the

public int ReconnectTimeout { get; set; }

SendBufferSize

Send buffer size in bytes (ClientWebSocket only). Default: 8192.

public int SendBufferSize { get; set; }

Ssl

Enable TLS (wss). Default: false.

public bool Ssl { get; set; }

SslCertPassword

Password for the PFX certificate.

public string? SslCertPassword { get; set; }

SslCertPath

Path to PFX certificate file for TLS (consumer/server). Required when ssl=true for consumer.

public string? SslCertPath { get; set; }

SubProtocol

WebSocket subprotocol to negotiate (e.g. "graphql-ws", "mqtt").

public string? SubProtocol { get; set; }

TrustAllCertificates

Producer only: accept any server certificate on a wss:// connection, including a

public bool TrustAllCertificates { get; set; }

Methods

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()