Exemple #1
0
 public void addObjectMessage(byte[]messageBlock,bool isTimed)
 {
     SequencedMessage message = new SequencedMessage(messageBlock);
     message.isTimed = isTimed;
     lock (ObjectMessagesQueue.SyncRoot)
     {
         ObjectMessagesQueue.Add(message);
     }
 }
Exemple #2
0
 public bool addRPCContent(SequencedMessage rpcMessage)
 {
     bool bufferSize = checkIfBufferIsFull(rpcMessage.content.Length);
     if (bufferSize == false)
     {
         this.RPCMessages.Add(rpcMessage);
         return true;
     }
     return false;
 }
Exemple #3
0
 public bool addObjectContent(SequencedMessage objectMessage)
 {
     bool bufferSize = checkIfBufferIsFull(objectMessage.content.Length);
     if (bufferSize == false)
     {
         this.ObjectMessages.Add(objectMessage);
         return true;
     }
     return false;
 }
Exemple #4
0
        public void addObjectMessage(byte[] messageBlock, bool isTimed)
        {
            SequencedMessage message = new SequencedMessage(messageBlock);

            message.isTimed = isTimed;
            lock (ObjectMessagesQueue.SyncRoot)
            {
                ObjectMessagesQueue.Add(message);
            }
        }
Exemple #5
0
        public bool addObjectContent(SequencedMessage objectMessage)
        {
            bool bufferSize = checkIfBufferIsFull(objectMessage.content.Length);

            if (bufferSize == false)
            {
                this.ObjectMessages.Add(objectMessage);
                return(true);
            }
            return(false);
        }
Exemple #6
0
        public bool addRPCContent(SequencedMessage rpcMessage)
        {
            bool bufferSize = checkIfBufferIsFull(rpcMessage.content.Length);

            if (bufferSize == false)
            {
                this.RPCMessages.Add(rpcMessage);
                return(true);
            }
            return(false);
        }
Exemple #7
0
        /*
         * Add a RPC Message with size byte automatically to the queue
         */
        public void addRpcMessage(byte[] messageBlock)
        {
            byte[] rpcSizeByte;
            if (messageBlock.Length > 127)
            {
                rpcSizeByte = NumericalUtils.uint16ToByteArray((UInt16)(messageBlock.Length + 0x8000), 0);
            }
            else
            {
                rpcSizeByte = NumericalUtils.uint16ToByteArrayShort((UInt16)messageBlock.Length);
            }
            DynamicArray content = new DynamicArray();
            content.append(rpcSizeByte);
            content.append(messageBlock);

            SequencedMessage message = new SequencedMessage(content.getBytes());
            RPCMessagesQueue.Add(message);
        }
Exemple #8
0
        /*
         * Add a RPC Message with size byte automatically to the queue
         */
        public void addRpcMessage(byte[] messageBlock)
        {
            byte[] rpcSizeByte;
            if (messageBlock.Length > 127)
            {
                rpcSizeByte = NumericalUtils.uint16ToByteArray((UInt16)(messageBlock.Length + 0x8000), 0);
            }
            else
            {
                rpcSizeByte = NumericalUtils.uint16ToByteArrayShort((UInt16)messageBlock.Length);
            }
            DynamicArray content = new DynamicArray();

            content.append(rpcSizeByte);
            content.append(messageBlock);

            SequencedMessage message = new SequencedMessage(content.getBytes());

            RPCMessagesQueue.Add(message);
        }