DisconnectWebsocketCommand.cs 621 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Net.WebSockets;
  3. using System.Text;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace gameapi.Commands
  7. {
  8. public class DisconnectWebsocketCommand : IWebsocketCommand
  9. {
  10. private string[] keys;
  11. public DisconnectWebsocketCommand(string[] keys)
  12. {
  13. this.keys = keys;
  14. }
  15. public async Task Run(WebSocket webSocket)
  16. {
  17. // await webSocket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(commandString), 0, commandString.Length), WebSocketMessageType.Text, true, CancellationToken.None);
  18. }
  19. }
  20. }