Beispiel #1
0
        public bool Handle(RequestEventArgs e)
        {
            NetworkRequest req = Multiplexor.Decode(e.Request);

            logger.Trace("Server rx: {0} p: {1} source: {2} overlord: {3}", req.Verb, req.Param, req.SourceID,
                         req.OverlordID);
            switch (req.Verb)
            {
            case "INFO":
                return(HandleClient(req, e));

            case "CONNECT":
                return(HandleConnect(req, e));

            case "CHAT":
                return(HandleChat(req, e));

            case "COMPARE":
                return(HandleCompare(e, req));

            case "SEARCH":
                return(HandleSearch(e, req));

            case "UPDATE":
                return(HandleUpdate(e, req));

            case "NOOP":
                return(HandleNOOP(e, req));
            }
            return(false);
        }
Beispiel #2
0
        public bool Handle(RequestEventArgs e)
        {
            NetworkRequest req = Multiplexor.Decode(e.Request);

            logger.Trace("Client rx: {0} p: {1} source: {2} overlord: {3}", req.Verb, req.Param, req.SourceID,
                         req.OverlordID);
            switch (req.Verb)
            {
            case "BROWSE":
                return(HandleBrowse(e, req));

            case "UPDATE":
                return(HandleUpdate(e, req));

            case "INFO":
                return(HandleInfo(e));

            case "NOOP":
                return(HandleNOOP(e, req));

            case "GET":
                return(HandleGet(e, req));

            case "DISCONNECT":
                return(HandleDisconnect(e));

            case "CHAT":
                return(HandleChat(e, req));

            case "COMPARE":
                return(HandleCompare(e, req));

            case "SEARCH":
                return(HandleSearch(e, req));

            case "CONVERSTATION":
                return(HandleConversation(e, req));

            case "ADDDOWNLOAD":
                return(HandleAddDownload(e, req));
            }
            return(false);
        }