#include <icy/packetfactory.h>Subclassed by:
PacketCreationStrategy< PacketT >
Abstract strategy for creating typed packets from raw buffer data.
| Return | Name | Description |
|---|---|---|
IPacketCreationStrategy | Defaulted constructor. | |
IPacket * | create const | Attempts to create a typed packet from the given buffer. |
int | priority const | Returns the dispatch priority of this strategy (0–100; higher runs first). |
IPacketCreationStrategy() = defaultDefaulted constructor.
const
IPacket * create(const ConstBuffer & buffer, size_t & nread) constAttempts to create a typed packet from the given buffer.
buffer Raw input data.
nread Set to the number of bytes consumed on success, 0 otherwise.
Newly allocated packet on success, nullptr if the buffer does not match.
const
int priority() constReturns the dispatch priority of this strategy (0–100; higher runs first).