Exemple #1
0
        public HttpMsg.MessageResponse ReqEcho(HttpMsg.MessageType reqType, DispatchData request)
        {
            logger.Debug($"\n{JValue.Parse(request.ReqData).ToString(Formatting.Indented)}");

            var reqData = request.GetData <HttpMsg.ReqEcho>();

            var ackData = new HttpMsg.AckEcho();

            ackData.uid     = reqData.uid;
            ackData.message = reqData.message;

            return(ackData);
        }
Exemple #2
0
        public HttpMsg.MessageResponse ReqAuthorizationCallBack(HttpMsg.MessageType reqType, DispatchData request)
        {
            logger.Debug($"\n{JValue.Parse(request.ReqData).ToString(Formatting.Indented)}");

            var reqData = request.GetData <HttpMsg.ReqAuthorizationCallBack>();

            var intlData = new InternalMsg.IntlMsg_Authorization();

            intlData.guid = reqData.state;

            intlData.state = reqData.state;
            intlData.code  = reqData.code;
            intlData.friendship_status_changed = reqData.friendship_status_changed;

            intlData.error       = reqData.error;
            intlData.description = reqData.description;

            NetServer.InternalHandleMessageByGuid(intlData);

            return(null);
        }