Exemplo n.º 1
0
        void IGreeterRpc_NoReply.GreetClass(Rpc.Test.Interface.DataClass dataClass)
        {
            var _writer_ = NetPool.DataWriterPool.Alloc();

            try
            {
                _writer_.Write((int)IGreeterRpc_Enum.GreetClass);
                NetDataSerializer.Serialize <Rpc.Test.Interface.DataClass>(_writer_, dataClass);
                SendRequest(_writer_);
            }
            finally
            {
                NetPool.DataWriterPool.Free(_writer_);
            }
        }
Exemplo n.º 2
0
        public async Task <Rpc.Test.Interface.DataClass> GreetClass(Rpc.Test.Interface.DataClass dataClass)
        {
            var _writer_ = NetPool.DataWriterPool.Alloc();

            try
            {
                _writer_.Write((int)IGreeterRpc_Enum.GreetClass);
                NetDataSerializer.Serialize <Rpc.Test.Interface.DataClass>(_writer_, dataClass);
                using (var _reader_ = await SendRequestAndReceive(_writer_))
                {
                    return(NetDataSerializer.Deserialize <Rpc.Test.Interface.DataClass>(_reader_));
                }
            }
            finally
            {
                NetPool.DataWriterPool.Free(_writer_);
            }
        }
Exemplo n.º 3
0
 public abstract Task <Rpc.Test.Interface.DataClass> GreetClass(Rpc.Test.Interface.DataClass dataClass);