Example #1
0
            public RpcHeader RequestChange(Item[] consume)
            {
                var packetId = Interlocked.Increment(ref globalPacketId);
                var header   = w.Request(() => {
                    w.Write(consume);
                }, length => new RpcHeader((int)MethodId.Change, (uint)packetId, length));

                return(header);
            }
Example #2
0
            public RpcHeader RequestAdd(Int32 a, Int32 b)
            {
                var packetId = Interlocked.Increment(ref globalPacketId);

                return(w.Request(() => {
                    w.Write(a);
                    w.Write(b);
                }, length => new RpcHeader((int)MethodId.Add, (uint)packetId, length)));
            }