69 void read(std::vector<uint8_t>& d)
virtual ~MT_buffer()=default
Destructor.
void appendData(const std::vector< uint8_t > &d)
Append new data to the stream.
void read(std::vector< uint8_t > &d)
Read the whole buffer.
std::vector< uint8_t > m_data
This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations.
MT_buffer()=default
Default constructor.
void readAndClear(std::vector< uint8_t > &d)
Read the whole buffer and empty it.
void clear()
Empty the buffer.
size_t size()
Return the number of available bytes at this moment.