Skip to content
Snippets Groups Projects
Commit f2840f6b authored by g0dil's avatar g0dil
Browse files

PPI: Add DgramReader MaxSize template argument

parent d7d6dc55
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment