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