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 : IDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”SseConnectionManager(DevUISerializer, VitreousDevUIOptions)
Section titled “ SseConnectionManager(DevUISerializer, VitreousDevUIOptions)”public SseConnectionManager(DevUISerializer serializer, VitreousDevUIOptions options)Parameters
Section titled “Parameters”serializer DevUISerializer
options VitreousDevUIOptions
Properties
Section titled “Properties”ClientCount
Section titled “ ClientCount”Number of connected clients.
public int ClientCount { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Broadcast(ExecutionTrace)
Section titled “ Broadcast(ExecutionTrace)”Broadcasts a trace to all active SSE clients. Clients whose buffer is full are removed.
public void Broadcast(ExecutionTrace trace)Parameters
Section titled “Parameters”trace ExecutionTrace
Dispose()
Section titled “ Dispose()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()Subscribe()
Section titled “ Subscribe()”Subscribes a new SSE client. Returns a reader channel that yields serialized SSE event strings. Dispose the returned subscription to disconnect.
public SseSubscription Subscribe()