KestrunContext.BroadcastEventAsync method
Asynchronously broadcasts a custom event to all connected SignalR clients using the IRealtimeBroadcaster service.
public Task<bool> BroadcastEventAsync(string eventName, object? data,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| eventName | The event name (e.g., Information, Warning, Error, Debug, Verbose). |
| data | The event data to broadcast. |
| cancellationToken | Optional: Cancellation token. |
Return Value
True if the event was broadcast successfully; otherwise, false.
See Also
- record KestrunContext
- namespace Kestrun.Models