18#ifndef __LIB_LIBNET_NETWORKQUEUE_H
19#define __LIB_LIBNET_NETWORKQUEUE_H
Index is a N-sized array of pointers to items of type T.
Networking packet queue implementation.
Packet * pop()
Retrieve packet with data.
virtual ~NetworkQueue()
Destructor.
Index< Packet, MaxPackets > m_data
Contains packets with data.
Index< Packet, MaxPackets > m_free
Contains unused packets.
Memory::Range m_payloadRange
Defines the memory range of mapped payload data.
static const Size PayloadBufferSize
Size of payload memory buffer.
struct NetworkQueue::Packet Packet
Represents a network packet.
bool hasData() const
Check if data packets are available.
Packet * get()
Get unused packet.
void release(Packet *packet)
Put unused packet back.
void push(Packet *packet)
Enqueue packet with data.
static const Size MaxPackets
Maximum number of packets available.
Log & operator<<(Log &log, const NetworkQueue::Packet &pkt)
unsigned int Size
Any sane size indicator cannot go negative.
unsigned char u8
Unsigned 8-bit number.
Represents a network packet.