public RPCReturnHandle Call(string functionName, RPCVariable parameter) { var signature = new RPCSignature(functionName); var messageBody = new RPCMessageBody(signature, parameter, RPCMessageBody.Type.call); var transmitableBody = new TransmitableRPCMessageBody(); transmitableBody.InitFromOriginalObejct(messageBody); var message = new Message(Message.Type.RPC, transmitableBody.Encode()); MessageCollector.instance.Collect(message); var returnHanlde = new RPCReturnHandle(signature); registeredReturnHandles.Add(returnHanlde); return(returnHanlde); }
public RPCMessageBody(RPCSignature signature, RPCVariable variable, Type type) { this.type = type; this.rpcSignature = signature; this.rpcVariable = variable; }
public RPCReturnHandle(RPCSignature signature) { this.signature = signature; isReady = false; returnValue = null; }