Packet producer that supports variable sized packets. More...
#include <consumer.h>
Public Member Functions | |
PacketProducer (PacketConsumer< SIZE > *consumer=0, unsigned cap_nq=0) | |
bool | produce (const unsigned char *buf, unsigned len) |
Put something in the buffer. |
Packet producer that supports variable sized packets.
PacketProducer< SIZE >::PacketProducer | ( | PacketConsumer< SIZE > * | consumer = 0 , |
|
unsigned | cap_nq = 0 | |||
) | [inline] |
bool PacketProducer< SIZE >::produce | ( | const unsigned char * | buf, | |
unsigned | len | |||
) | [inline] |
Put something in the buffer.
Please note that this function is not locked, thus only a single producer should do the access at the very same time.