Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public RPCMessageBody(RPCSignature signature, RPCVariable variable, Type type)
 {
     this.type         = type;
     this.rpcSignature = signature;
     this.rpcVariable  = variable;
 }
Exemplo n.º 3
0
 public RPCReturnHandle(RPCSignature signature)
 {
     this.signature = signature;
     isReady        = false;
     returnValue    = null;
 }