Exemplo n.º 1
0
        public async MyTask <RpcTestInterface.Param> Hello3(RpcTestInterface.Param p)
        {
            ICHelloService_Hello3_MsgIn msg = new ICHelloService_Hello3_MsgIn();

            msg.p = p;
            Func <byte[], int, ValueTuple <byte[], int, int> > f = delegate(byte[] buffer, int start)
            {
                var msgSerializeInfo = Serializer.Serialize(msg, buffer, start);
                return(msgSerializeInfo);
            };
            var ret = (ICHelloService_Hello3_MsgOut)await CallAsync.SendWithResponse(ChunkType, (int)ProtoID.EICHelloService_Hello3_MsgIn, f);

            return(ret.Value);
        }
Exemplo n.º 2
0
        private async MyTask Process_Hello3(int iCommunicateID, IMessage _msg)
        {
            ICHelloService_Hello3_MsgIn msg = (ICHelloService_Hello3_MsgIn)_msg;
            var ret = await m_service.Hello3(msg.p);

            ICHelloService_Hello3_MsgOut msgRet = new ICHelloService_Hello3_MsgOut();

            msgRet.Value = ret;
            Func <byte[], int, ValueTuple <byte[], int, int> > f = delegate(byte[] buffer, int start)
            {
                var msgSerializeInfo = m_service.Serializer.Serialize(msgRet, buffer, start);
                return(msgSerializeInfo);
            };

            m_service.CallAsync.SendWithoutResponse(m_service.ChunkType, iCommunicateID, (int)ProtoID.EICHelloService_Hello3_MsgOut, f);
        }
Exemplo n.º 3
0
        private IMessage Deserialize_Hello3(byte[] bytes, int iStartIndex, int iCount)
        {
            ICHelloService_Hello3_MsgIn msg = m_service.Serializer.Deserialize <ICHelloService_Hello3_MsgIn>(bytes, iStartIndex, iCount);

            return(msg);
        }