private void WebSocketClosed(WebSocketClosed message) { _clientRegistry.Tell(new ClientDisconnected(_clientId)); Self.Tell(PoisonPill.Instance); }
/// <summary> /// Dispatches the <see cref="WebSocketClosed"/> event asynchronously. /// </summary> /// <param name="eventArgs">the event arguments passed with the event</param> /// <returns>a task that represents the asynchronous operation</returns> protected virtual Task OnWebSocketClosedAsync(WebSocketClosedEventArgs eventArgs) => WebSocketClosed.InvokeAsync(this, eventArgs);
/// <summary> /// Handles the WebSocketClosed event of the _currentWebSocket control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> void OnCurrentWebSocketClosed(object sender, EventArgs e) { Logger.LogWarning("Web socket connection closed."); WebSocketClosed?.Invoke(this, EventArgs.Empty); }