Esempio n. 1
0
        public static OutgoingAggreGateCommand operationMessage()
        {
            var cmd = new OutgoingAggreGateCommand();

            cmd.addParam(AggreGateCommand.COMMAND_CODE_MESSAGE.ToString());
            cmd.addParam(AggreGateCommand.generateId());
            cmd.addParam(AggreGateCommand.MESSAGE_CODE_OPERATION.ToString());
            return(cmd);
        }
Esempio n. 2
0
        public static OutgoingAggreGateCommand startMessage()
        {
            var cmd = new OutgoingAggreGateCommand();

            cmd.addParam(AggreGateCommand.COMMAND_CODE_MESSAGE.ToString());
            cmd.addParam(AggreGateCommand.generateId());
            cmd.addParam(AggreGateCommand.MESSAGE_CODE_START.ToString());
            cmd.addParam(CLIENT_PROTOCOL_VERSION.ToString());
            return(cmd);
        }
        protected override Command encapsulate()
        {
            var enc = new OutgoingAggreGateCommand();

            enc.WriteByte((byte)START_CHAR);
            enc.Write(this.Stream.GetBuffer(), 0, (int)this.Stream.Length);
            enc.WriteByte((byte)END_CHAR);

            enc.setAsync(isAsync());
            return(enc);
        }