Class WebSocketEndpointRegistry

Namespace
Kuestenlogik.Bowire.Protocol.WebSocket
Assembly
Kuestenlogik.Bowire.Protocol.WebSocket.dll

Default IWebSocketEndpointRegistry backed by a lock-guarded List<T>. Public so consumers who want to construct one directly (test fixtures, in-process embedding outside the standard DI extension) can do so without going through the service collection.

public sealed class WebSocketEndpointRegistry : IWebSocketEndpointRegistry
Inheritance
WebSocketEndpointRegistry
Implements
Inherited Members

Constructors

WebSocketEndpointRegistry()

public WebSocketEndpointRegistry()

Methods

Add(WebSocketEndpointInfo)

Append an endpoint to the registry. Thread-safe. Throws ArgumentNullException if endpoint is null.

public void Add(WebSocketEndpointInfo endpoint)

Parameters

endpoint WebSocketEndpointInfo

Snapshot()

Stable snapshot of the registered endpoints at the moment of the call. The returned list is detached from the registry's internal storage — concurrent Add(WebSocketEndpointInfo) calls after the snapshot don't mutate it.

public IReadOnlyList<WebSocketEndpointInfo> Snapshot()

Returns

IReadOnlyList<WebSocketEndpointInfo>