示例#1
0
        public InvokeOperation <TResult> Invoke <TResult>(uint methodId, byte[] forwardKey, params object[] args)
        {
            var handle = new InvokeOperation <TResult>();

            Invoke(handle, methodId, forwardKey, args);

            return(handle);
        }
示例#2
0
        private void Invoke(InvokeOperation op, uint methodId, byte[] forwardKey, object[] args)
        {
            op.MethodId = methodId;
            lock (invokeOperations)
            {
                op.InvokeId = currentInvokeId++;
                invokeOperations[op.InvokeId] = op;
            }

            DoSend(op.InvokeId, methodId, forwardKey, args);
        }
示例#3
0
        private void RequestReturn(InvokeOperation<PlayerInfo> handle)
        {
            if (!handle.IsComplete)
            {
                Console.WriteLine("RequestReturn failed");
                return;
            }

            Console.WriteLine("RequestReturn info:");
            Console.WriteLine(handle.Result.ToString());
        }