private static void ProcessCommand(WebSocketSession session, string value) { Command command = JsonConvert.DeserializeObject <Command>(value); if (command.Token != Bus.AuthToken) { BusLogger.LogException(new InvalidAuthTokenException("INVALID AUTHENTICATION TOKEN ERROR")); session.Send(JsonConvert.SerializeObject(CommandProcessor.CommandCallback("error_message", "An incorrect authentication key was provided"))); return; } session.Send(CommandProcessor.RunCommand(command)); session.Close(); }