public override async Task OnDisconnected(WebSocket socket) { var socketId = WebSocketConnectionManager.GetId(socket); await base.OnDisconnected(socket); var message = new Message() { MessageType = MessageType.Text, Data = $"{socketId} disconnected" }; await SendMessageToAllAsync(message); }
public ChatHandler(WebSocketConnectionManager webSocketConnectionManager) : base(webSocketConnectionManager) { }
public WebSocketHandler(WebSocketConnectionManager webSocketConnectionManager) { WebSocketConnectionManager = webSocketConnectionManager; }