INET Framework for OMNeT++/OMNEST
|
Buffer that carries BytesArrays. More...
#include <ByteArrayBuffer.h>
Public Member Functions | |
ByteArrayBuffer () | |
Ctor. More... | |
ByteArrayBuffer (const ByteArrayBuffer &other) | |
Copy ctor. More... | |
ByteArrayBuffer & | operator= (const ByteArrayBuffer &other) |
virtual ByteArrayBuffer * | dup () const override |
virtual void | clear () |
Clear buffer. More... | |
virtual void | push (const ByteArray &byteArrayP) |
Push data to end of buffer. More... | |
virtual void | push (const void *bufferP, unsigned int bufferLengthP) |
Push data to end of buffer. More... | |
virtual uint64 | getLength () const |
Returns length of stored data. More... | |
virtual unsigned int | getBytesToBuffer (void *bufferP, unsigned int bufferLengthP, unsigned int srcOffsP=0) const |
Copy bytes to an external buffer. More... | |
virtual unsigned int | popBytesToBuffer (void *bufferP, unsigned int bufferLengthP) |
Move bytes to an external buffer. More... | |
virtual unsigned int | drop (unsigned int lengthP) |
Drop bytes from buffer. More... | |
Protected Types | |
typedef std::list< ByteArray > | DataList |
Protected Attributes | |
uint64 | dataLengthM |
DataList | dataListM |
Private Member Functions | |
void | copy (const ByteArrayBuffer &other) |
Buffer that carries BytesArrays.
|
protected |
inet::ByteArrayBuffer::ByteArrayBuffer | ( | ) |
Ctor.
inet::ByteArrayBuffer::ByteArrayBuffer | ( | const ByteArrayBuffer & | other | ) |
Copy ctor.
|
virtual |
Clear buffer.
Referenced by inet::tcp::TCPByteStreamSendQueue::init(), inet::tcp::TcpLwipByteStreamSendQueue::setConnection(), inet::tcp::TCP_NSC_ByteStreamSendQueue::setConnection(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::setConnection(), and inet::tcp::TcpLwipByteStreamReceiveQueue::setConnection().
|
inlineprivate |
Referenced by ByteArrayBuffer(), and operator=().
|
virtual |
Drop bytes from buffer.
lengthP | count of droppable bytes |
Referenced by inet::tcp::TCP_NSC_ByteStreamSendQueue::dequeueTcpLayerMsg(), inet::tcp::TcpLwipByteStreamSendQueue::dequeueTcpLayerMsg(), inet::tcp::TCPByteStreamSendQueue::discardUpTo(), and popBytesToBuffer().
|
inlineoverridevirtual |
|
virtual |
Copy bytes to an external buffer.
bufferP | pointer to output buffer |
bufferLengthP | length of output buffer |
srcOffsP | source offset |
Referenced by inet::tcp::TCPByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::getBytesForTcpLayer(), inet::tcp::TCP_NSC_ByteStreamSendQueue::getBytesForTcpLayer(), and popBytesToBuffer().
|
inlinevirtual |
Returns length of stored data.
Referenced by inet::tcp::TCP_NSC_ByteStreamReceiveQueue::extractBytesUpTo(), inet::tcp::TcpLwipByteStreamReceiveQueue::extractBytesUpTo(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::getAmountOfBufferedBytes(), inet::tcp::TcpLwipByteStreamReceiveQueue::getAmountOfBufferedBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::getBytesAvailable(), inet::tcp::TcpLwipByteStreamSendQueue::getBytesAvailable(), inet::tcp::TcpLwipByteStreamReceiveQueue::getExtractableBytesUpTo(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::getQueueLength(), inet::tcp::TcpLwipByteStreamReceiveQueue::getQueueLength(), and inet::tcp::TCPByteStreamSendQueue::info().
ByteArrayBuffer & inet::ByteArrayBuffer::operator= | ( | const ByteArrayBuffer & | other | ) |
|
virtual |
Move bytes to an external buffer.
bufferP | pointer to output buffer |
bufferLengthP | length of output buffer |
Referenced by inet::tcp::TCP_NSC_ByteStreamReceiveQueue::extractBytesUpTo(), and inet::tcp::TcpLwipByteStreamReceiveQueue::extractBytesUpTo().
|
virtual |
Push data to end of buffer.
Referenced by inet::tcp::TCP_NSC_ByteStreamSendQueue::enqueueAppData(), inet::tcp::TcpLwipByteStreamSendQueue::enqueueAppData(), inet::tcp::TCPByteStreamSendQueue::enqueueAppData(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::enqueueNscData(), and inet::tcp::TcpLwipByteStreamReceiveQueue::enqueueTcpLayerData().
|
virtual |
Push data to end of buffer.
|
protected |
|
protected |
Referenced by clear(), copy(), drop(), getBytesToBuffer(), and push().