Class WsEndpoint

Assembly: redb.Route.WebSocket.dll

WebSocket endpoint. Creates either a producer (ClientWebSocket) or consumer (Kestrel WS server).

public class WsEndpoint : EndpointBase<WsEndpointOptions>, IEndpoint, IEndpointStatistics

Inheritance

Object→WsEndpointOptions}→WsEndpoint

Implements

Properties

ConsumerPath

The consumer route path (after host:port).

public string ConsumerPath { get; }

Methods

BuildProducerUrl()

Builds the full WebSocket URL for the producer client.

public string BuildProducerUrl()

CreateConsumer(IProcessor)

Creates a consumer for receiving messages from this endpoint.

public override IConsumer CreateConsumer(IProcessor processor)

CreateProducer()

Creates a producer for sending messages to this endpoint.

public override IProducer CreateProducer()

Start(CancellationToken)

Declares WebSocket support on the listener BEFORE any consumer starts it. The route context

public override Task Start(CancellationToken ct = default)

Constructors