KestrunHostSignalRExtensions.BroadcastEventAsync method

Broadcasts an event to all connected SignalR clients using the best available service provider.

public static Task<bool> BroadcastEventAsync(this KestrunHost host, string eventName, 
    object? data = null, HttpContext? httpContext = null, 
    CancellationToken cancellationToken = default)
parameter description
host The KestrunHost instance.
eventName The name of the event to broadcast.
data Optional data to include with the event.
httpContext Optional: The current HttpContext, if available.
cancellationToken Optional: Cancellation token.

See Also