Class EventHub
Broadcasts gateway events to connected clients in real-time.
public sealed class EventHub : Hub, IDisposable
- Inheritance
-
EventHub
- Implements
- Inherited Members
Constructors
EventHub(IEventBus)
public EventHub(IEventBus eventBus)
Parameters
eventBusIEventBus
Methods
OnConnectedAsync()
Called when a new connection is established with the hub.
public override Task OnConnectedAsync()
Returns
StreamEvents(string?, CancellationToken)
Streams all gateway events (or filtered by type) to the client.
public IAsyncEnumerable<GatewayEvent> StreamEvents(string? eventTypeFilter = null, CancellationToken ct = default)
Parameters
eventTypeFilterstringctCancellationToken