Exemplo n.º 1
0
        public override async Task OnBinaryAsync(WebSocketEventArgs e, byte[] buffer)
        {
            var content  = DeserializeFromBinary(buffer);
            var response = await MessageControllerFactory.ProcessAsync(content);

            if (response != null)
            {
                await SendTextAsync(e.SocketId, response);
            }
        }
Exemplo n.º 2
0
        public override async Task OnTextAsync(WebSocketEventArgs e, string text)
        {
            var content  = DeserializeFromText(text);
            var response = await MessageControllerFactory.ProcessAsync(content);

            if (response != null)
            {
                await SendTextAsync(e.SocketId, response);
            }
        }
Exemplo n.º 3
0
 public virtual async Task OnBinaryAsync(WebSocketEventArgs e, byte[] buffer) => await Task.CompletedTask;
Exemplo n.º 4
0
 public virtual async Task OnCloseAsync(WebSocketEventArgs e) => await Task.CompletedTask;
Exemplo n.º 5
0
 public virtual async Task OnTextAsync(WebSocketEventArgs e, string text) => await Task.CompletedTask;