Ejemplo n.º 1
0
 private void AddWsServerService()
 {
     _wsServerService = new WsServerService();
     _wsServerService.OnMessageReceived += HandleWsServerServiceOnMessageReceived;
     _wsServerService.OnClosed          += HandleWsServerServiceOnClosed;
     _webSocketServer.AddWebSocketService("/", () => _wsServerService);
 }
Ejemplo n.º 2
0
 private void RemoveWsServerService()
 {
     _wsServerService.OnClosed          -= HandleWsServerServiceOnClosed;
     _wsServerService.OnMessageReceived -= HandleWsServerServiceOnMessageReceived;
     _wsServerService = null;
 }