Exemple #1
0
        private static void HandleRequest(FireFrame fireframe)
        {
            switch (fireframe.GetComponent())
            {
            case 0x5:
                RedirectorComponent.HandleRequest(fireframe);
                break;

            default:
                Log.Warn(string.Format("Received an unhandled request: {0}::{1}.", fireframe.GetComponent(), fireframe.GetCommand()));
                break;
            }
        }
Exemple #2
0
        public static string GetCommandName(ushort componentId, ushort commandId)
        {
            string result = "";

            switch ((Component)componentId)
            {
            case Component.AUTHENTICATION:
                result = AuthenticationComponent.GetCommandName(commandId);
                break;

            case Component.GAMEMANAGER:
                result = GameManagerComponent.GetCommandName(commandId);
                break;

            case Component.REDIRECTOR:
                result = RedirectorComponent.GetCommandName(commandId);
                break;

            case Component.STATS:
                result = StatsComponent.GetCommandName(commandId);
                break;

            case Component.UTIL:
                result = UtilComponent.GetCommandName(commandId);
                break;

            case Component.CLUBS:
                result = ClubsComponent.GetCommandName(commandId);
                break;

            case Component.RSP:
                result = RSPComponent.GetCommandName(commandId);
                break;

            case Component.USERSESSIONS:
                result = UserSessionsComponent.GetCommandName(commandId);
                break;

            case Component.GAMEREPORTING:
                result = GameReportingComponent.GetCommandName(commandId);
                break;

            default:
                result = string.Format("0x" + commandId.ToString("X4"));
                break;
            }

            return(result);
        }
Exemple #3
0
        public static void HandleRequest(ulong clientId, Packet packet, SslStream stream)
        {
            Utilities.LogRequest(packet);

            switch (packet.componentId)
            {
            case Component.REDIRECTOR:
                RedirectorComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.UTIL:
                UtilComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.AUTHENTICATION:
                AuthenticationComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.USERSESSIONS:
                UserSessionsComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.GAMEMANAGER:
                GameManagerComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.RSP:
                RSPComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.GAMEREPORTING:
                GameReportingComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.CLUBS:
                ClubsComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.STATS:
                StatsComponent.HandleComponent(clientId, packet, stream);
                break;

            default:
                Utilities.LogUnhandledRequest(packet);
                //SendError(packet, stream);
                break;
            }
        }