예제 #1
0
 private void WebSocketClosed(WebSocketClosed message)
 {
     _clientRegistry.Tell(new ClientDisconnected(_clientId));
     Self.Tell(PoisonPill.Instance);
 }
예제 #2
0
 /// <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);
예제 #3
0
        /// <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);
        }