Skip to content

SseConnectionManager class

Namespace: Vitreous.DevUI.Middleware
Assembly: Vitreous.DevUI.dll

Manages active SSE client connections and broadcasts new traces to all of them. Thread-safe. Each client has a bounded buffer; a client that falls that far behind is disconnected (its browser reconnects and replays the buffer).

public sealed class SseConnectionManager : IDisposable

object ← SseConnectionManager

IDisposable

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

SseConnectionManager(DevUISerializer, VitreousDevUIOptions)

Section titled “ SseConnectionManager(DevUISerializer, VitreousDevUIOptions)”
public SseConnectionManager(DevUISerializer serializer, VitreousDevUIOptions options)

serializer DevUISerializer

options VitreousDevUIOptions

Number of connected clients.

public int ClientCount { get; }

int

Broadcasts a trace to all active SSE clients. Clients whose buffer is full are removed.

public void Broadcast(ExecutionTrace trace)

trace ExecutionTrace

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Subscribes a new SSE client. Returns a reader channel that yields serialized SSE event strings. Dispose the returned subscription to disconnect.

public SseSubscription Subscribe()

SseSubscription