Example #1
0
        public async MyTask <ValueTuple <System.Int32, System.Int32> > HelloInt(System.Int32 a)
        {
            ISHelloService_HelloInt_MsgIn msg = new ISHelloService_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 = (ISHelloService_HelloInt_MsgOut)await CallAsync.SendWithResponse(ChunkType, (int)ProtoID.EISHelloService_HelloInt_MsgIn, f);

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

            ISHelloService_HelloInt_MsgOut msgRet = new ISHelloService_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.EISHelloService_HelloInt_MsgOut, f);
        }
Example #3
0
        private IMessage Deserialize_HelloInt(byte[] bytes, int iStartIndex, int iCount)
        {
            ISHelloService_HelloInt_MsgIn msg = m_service.Serializer.Deserialize <ISHelloService_HelloInt_MsgIn>(bytes, iStartIndex, iCount);

            return(msg);
        }