From: g0dil Date: Tue, 21 Jul 2009 15:07:44 +0000 (+0000) Subject: PPI: Add DgramReader MaxSize template argument X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=022bf6dad2b296ec1ffadf29a98138b262590633;p=senf.git PPI: Add DgramReader MaxSize template argument git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1275 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/SocketSource.ct b/PPI/SocketSource.ct index e225661..bc60d29 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -31,13 +31,13 @@ ///////////////////////////////ct.p//////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -// senf::ppi::DgramReader +// senf::ppi::DgramReader -template -prefix_ Packet senf::ppi::DgramReader::operator()(Handle handle) +template +prefix_ Packet senf::ppi::DgramReader::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 3c78d58..ceb5bc8 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 + template class DgramReader { public: