From: g0dil Date: Mon, 3 Sep 2007 15:50:00 +0000 (+0000) Subject: PPI: Small documentation fix X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=aab64270dd15a9b9a3e7dc61e076d32b6bc5c66d;p=senf.git PPI: Small documentation fix git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@427 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/SocketReader.hh b/PPI/SocketReader.hh index c850603..5d26913 100644 --- a/PPI/SocketReader.hh +++ b/PPI/SocketReader.hh @@ -74,22 +74,26 @@ namespace module { /** \brief Input module reading data from an arbitrary FileHandle This input module will read data from a FileHandle object and parse the data according to - the \a Reader. - - The \a Reader must fulfill the following interface: + the \a Reader. The default reader is senf::ppi::PacketReader <> which reads the data into a + senf::DataPacket. To parse the data according to some other packet type, pass that packet + type to senf::ppi::PacketReader: \code - class SomeReader - { - public: - typedef unspecified_type Handle; // type of handle requested - SomeReader(); // default constructible - Packet operator()(Handle handle); // extraction function - }; + senf::ppi::module::ActiveSocketReader< senf::ppi::PacketReader > reader; + \endcode + declares a \a reader module reading senf::EthrtnetPacket's. + + A \a Reader must fulfill the following interface: + \code + class SomeReader + { + public: + typedef unspecified_type Handle; // type of handle requested + SomeReader(); // default constructible + Packet operator()(Handle handle); // extraction function + }; \endcode - Whenever the FileHandle object is ready for reading, the \a Reader's \c operator() is called - to read a packet. The default \a Reader is \c PacketReader<>, which will read packets from a - datagram SocketHandle into DataPacket's. You may + to read a packet. \ingroup io_modules */ diff --git a/PPI/SocketWriter.hh b/PPI/SocketWriter.hh index dccb218..118273d 100644 --- a/PPI/SocketWriter.hh +++ b/PPI/SocketWriter.hh @@ -73,7 +73,10 @@ namespace module { output module is active. This requires the file handle to be able to signal its readiness to accept more data via the Scheduler. - The \a Writer must fulfill the following interface: + The default \a Writer is senf::ppi::PacketWriter which will write out the complete packet to + the file handle. + + A \a Writer must fulfill the following interface: \code class SomeWriter { @@ -83,6 +86,7 @@ namespace module { void operator()(Handle handle, Packet packet); // insertion function }; \endcode + Whenever a packet is received for sending, the \a Writer's \c operator() is called. \ingroup io_modules */ @@ -115,6 +119,9 @@ namespace module { mechanism. Either this is desired (like for a UDP socket) or some additional bandwidth shaping needs to be used. + The default \a Writer is senf::ppi::PacketWriter which will write out the complete packet to + the file handle. + The \a Writer must fulfill the following interface: \code class SomeWriter @@ -125,6 +132,7 @@ namespace module { void operator()(Handle handle, Packet packet); // insertion function }; \endcode + Whenever a packet is received for sending, the \a Writer's \c operator() is called. \ingroup io_modules */