17 int enqueuedTotalLength = 0;
22 return enqueuedTotalLength;
68 public VoipQueue(
byte id,
bool canSend,
bool canReceive)
76 buffers[i] =
new byte[VoipConfig.MAX_COMPRESSED_SIZE];
89 if (length >
byte.MaxValue) {
return; }
120 if (!
CanSend) {
throw new Exception(
"Called Write on a VoipQueue not set up for sending"); }
138 if (!
CanReceive) {
throw new Exception(
"Called Read on a VoipQueue not set up for receiving"); }
virtual bool Read(IReadMessage msg, bool discardData=false)
void RetrieveBuffer(int id, out int outSize, out byte[] outBuf)
void EnqueueBuffer(int length)
virtual void Write(IWriteMessage msg)
VoipQueue(byte id, bool canSend, bool canReceive)
byte[] ReadBytes(int numberOfBytes)
void WriteBytes(byte[] val, int startIndex, int length)
void WriteBoolean(bool val)
void WriteUInt16(UInt16 val)