X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FSocketSource.hh;h=44368fb528914cc0d648a9bd2d606a80226dd887;hb=92f8630b75f3ef50e73c48cde58645dcd1534e27;hp=477df4bad8e86e5d98b06dbfe31f7c0a26cbf88c;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/PPI/SocketSource.hh b/PPI/SocketSource.hh index 477df4b..44368fb 100644 --- a/PPI/SocketSource.hh +++ b/PPI/SocketSource.hh @@ -23,8 +23,8 @@ /** \file \brief SocketSource public header */ -#ifndef HH_SocketSource_ -#define HH_SocketSource_ 1 +#ifndef HH_SENF_PPI_SocketSource_ +#define HH_SENF_PPI_SocketSource_ 1 // Custom includes #include "../Packets/Packets.hh" @@ -53,6 +53,7 @@ namespace ppi { class DgramReader { public: + typedef Packet PacketType; typedef senf::ClientSocketHandle< senf::MakeSocketPolicy< senf::ReadablePolicy, senf::DatagramFramingPolicy >::policy > Handle; @@ -90,11 +91,12 @@ namespace module { { public: typedef unspecified_type Handle; // type of handle requested + typedef unspecified_type PacketType // type of packet returned SomeReader(); // EITHER default constructible SomeReader(SomeReader const & other); // OR copy constructible - Packet operator()(Handle handle); // extraction function + PacketType operator()(Handle handle); // extraction function }; \endcode Whenever the FileHandle object is ready for reading, the \a Reader's \c operator() is called @@ -111,7 +113,8 @@ namespace module { public: typedef typename Reader::Handle Handle; ///< Handle type requested by the reader - connector::ActiveOutput<> output; ///< Output connector to which the data received is written + connector::ActiveOutput output; + ///< Output connector to which the data received is written ActiveSocketSource(Handle handle); ///< Create new reader for the given handle /**< Data will be read from \a handle and be parsed by \a