public void addObjectMessage(byte[]messageBlock,bool isTimed) { SequencedMessage message = new SequencedMessage(messageBlock); message.isTimed = isTimed; lock (ObjectMessagesQueue.SyncRoot) { ObjectMessagesQueue.Add(message); } }
public bool addRPCContent(SequencedMessage rpcMessage) { bool bufferSize = checkIfBufferIsFull(rpcMessage.content.Length); if (bufferSize == false) { this.RPCMessages.Add(rpcMessage); return true; } return false; }
public bool addObjectContent(SequencedMessage objectMessage) { bool bufferSize = checkIfBufferIsFull(objectMessage.content.Length); if (bufferSize == false) { this.ObjectMessages.Add(objectMessage); return true; } return false; }
public void addObjectMessage(byte[] messageBlock, bool isTimed) { SequencedMessage message = new SequencedMessage(messageBlock); message.isTimed = isTimed; lock (ObjectMessagesQueue.SyncRoot) { ObjectMessagesQueue.Add(message); } }
public bool addObjectContent(SequencedMessage objectMessage) { bool bufferSize = checkIfBufferIsFull(objectMessage.content.Length); if (bufferSize == false) { this.ObjectMessages.Add(objectMessage); return(true); } return(false); }
public bool addRPCContent(SequencedMessage rpcMessage) { bool bufferSize = checkIfBufferIsFull(rpcMessage.content.Length); if (bufferSize == false) { this.RPCMessages.Add(rpcMessage); return(true); } return(false); }
/* * 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); }