Esempio 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);
            }
        }
Esempio 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);
            }
        }
Esempio n. 3
0
 public virtual async Task OnBinaryAsync(WebSocketEventArgs e, byte[] buffer) => await Task.CompletedTask;
Esempio n. 4
0
 public virtual async Task OnCloseAsync(WebSocketEventArgs e) => await Task.CompletedTask;
Esempio n. 5
0
 public virtual async Task OnTextAsync(WebSocketEventArgs e, string text) => await Task.CompletedTask;