public InvokeOperation <TResult> Invoke <TResult>(uint methodId, byte[] forwardKey, params object[] args) { var handle = new InvokeOperation <TResult>(); Invoke(handle, methodId, forwardKey, args); return(handle); }
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); }
private void RequestReturn(InvokeOperation<PlayerInfo> handle) { if (!handle.IsComplete) { Console.WriteLine("RequestReturn failed"); return; } Console.WriteLine("RequestReturn info:"); Console.WriteLine(handle.Result.ToString()); }