Esempio n. 1
0
        public async MyTask <ValueTuple <System.Int32, System.Int32> > HelloInt(System.Int32 a)
        {
            ICHelloService_HelloInt_MsgIn msg = new ICHelloService_HelloInt_MsgIn();

            msg.a = a;
            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_HelloInt_MsgOut)await CallAsync.SendWithResponse(ChunkType, (int)ProtoID.EICHelloService_HelloInt_MsgIn, f);

            return(ret.Value);
        }
Esempio n. 2
0
        private async MyTask Process_HelloInt(int iCommunicateID, IMessage _msg)
        {
            ICHelloService_HelloInt_MsgIn msg = (ICHelloService_HelloInt_MsgIn)_msg;
            var ret = await m_service.HelloInt(msg.a);

            ICHelloService_HelloInt_MsgOut msgRet = new ICHelloService_HelloInt_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_HelloInt_MsgOut, f);
        }
Esempio n. 3
0
        private IMessage Deserialize_HelloInt(byte[] bytes, int iStartIndex, int iCount)
        {
            ICHelloService_HelloInt_MsgIn msg = m_service.Serializer.Deserialize <ICHelloService_HelloInt_MsgIn>(bytes, iStartIndex, iCount);

            return(msg);
        }