private static void HandleMessage(WebSocket websocket, string message)
 {
     foreach (var apiController in
         ApiControllers.Select(controller => controller.Value)
             .Where(apiController => apiController.Client == websocket))
     {
         var packet = new Packets(message);
         apiController.HandlePacket(packet);
     }
 }
 private static void HandleMessage(WebSocket websocket, string message)
 {
     foreach (var apiController in
              ApiControllers.Select(controller => controller.Value)
              .Where(apiController => apiController.Client == websocket))
     {
         var packet = new Packets(message);
         apiController.HandlePacket(packet);
     }
 }
Exemple #3
0
        private static void HandleMessage(WebSocket websocket, string message)
        {
            ApiController controller;

            ApiControllers.TryGetValue(websocket.GetHashCode().ToString(), out controller);
            if (controller == null)
            {
                return;
            }
            var packet = new Packets(controller.AuthClient, message);

            controller.HandlePacket(packet);
        }