public override async Task OnConnected(string id, WebSocket socket)
        {
            await base.OnConnected(id, socket);

            var socketId = WebSocketConnectionManager.GetId(socket);

            await SendMessageToAllAsync($"{socketId} is now connected");
        }
        public override async Task ReceiveAsync(WebSocket socket, WebSocketReceiveResult result, byte[] buffer)
        {
            var socketId = WebSocketConnectionManager.GetId(socket);
            var message  = $"{socketId} said: {Encoding.UTF8.GetString(buffer, 0, buffer.Length)}";

            message = message.TrimEnd('\0');

            await SendMessageToAllAsync(message);
        }
 public WebSocketHandler(WebSocketConnectionManager webSocketConnectionManager)
 {
     this.WebSocketConnectionManager = webSocketConnectionManager;
 }
 public ChatMessageHandler(WebSocketConnectionManager webSocketConnectionManager) : base(webSocketConnectionManager)
 {
 }