diff --git a/PPI/SocketSource.ct b/PPI/SocketSource.ct index e2256615beb51967c7cecad0a5ef87463ae1d4c6..bc60d299c6c728e6978091e6544748552e30b539 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -31,13 +31,13 @@ ///////////////////////////////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; } diff --git a/PPI/SocketSource.hh b/PPI/SocketSource.hh index 3c78d5851fc9b74b1dc29a7b9d4245cb7d8a848a..ceb5bc83475e02cd76dd9694df8187e055345cba 100644 --- a/PPI/SocketSource.hh +++ b/PPI/SocketSource.hh @@ -49,7 +49,7 @@ namespace ppi { 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: