///////////////////////////////ct.p////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
-// senf::ppi::DgramReader<Packet>
+// senf::ppi::DgramReader<Packet,MaxSize>
-template <class Packet>
-prefix_ Packet senf::ppi::DgramReader<Packet>::operator()(Handle handle)
+template <class Packet, unsigned MaxSize>
+prefix_ Packet senf::ppi::DgramReader<Packet,MaxSize>::operator()(Handle handle)
{
Packet packet (Packet::create(senf::noinit));
- handle.read(packet.data(),0u);
+ handle.read(packet.data(),MaxSize);
return packet;
}
defaults to DataPacket (type DataPacketType), which will place the data uninterpreted
into a packet data structure.
*/
- template <class Packet=DataPacket>
+ template <class Packet=DataPacket, unsigned MaxSize=0u>
class DgramReader
{
public: