16 std::queue<std::vector<uint8_t>> mQueue;
17 std::atomic_size_t mSize;
26 inline bool Empty() const noexcept
Thread-safe queue for buffering packet data bytes.
Definition: packet_buffer.h:13
bool TryDequeue(std::vector< uint8_t > &packet)
Try to peek a packet from the buffer by removing it.
bool TryClear()
Try to make the buffer empty.
bool Empty() const noexcept
Indicate whether the buffer is empty or not.
Definition: packet_buffer.h:26
bool TryEnqueue(std::vector< uint8_t > &&packet)
Try to insert a packet to the buffer via moving.