#define HH_SocketReader_ 1
// Custom includes
-#include "Packets/Packet.hh"
-#include "Packets/DataPacket.hh"
+#include "Packets/Packets.hh"
+#include "Socket/ClientSocketHandle.hh"
+#include "Socket/SocketPolicy.hh"
+#include "Socket/ReadWritePolicy.hh"
+#include "Socket/FramingPolicy.hh"
#include "Module.hh"
-#include "Connector.hh"
+#include "Connectors.hh"
+#include "IOEvent.hh"
//#include "SocketReader.mpp"
///////////////////////////////hh.p////////////////////////////////////////
public:
typedef senf::ClientSocketHandle<
senf::MakeSocketPolicy< senf::ReadablePolicy,
- senf::DatagramFramingPolicy > > Handle;
+ senf::DatagramFramingPolicy >::policy > Handle;
///< Handle type supported by this reader
- Packet::ptr operator()(Handle handle);
+ Packet operator()(Handle handle);
///< Read packet from \a handle
/**< Read a datagram from \a handle and interpret is as
packet of type \c Packet.
class SomeReader
{
public:
- typedef unspecified_type Handle; // type of handle reqeusted
+ typedef unspecified_type Handle; // type of handle requested
SomeReader(); // default constructible
Packet::ptr operator()(Handle handle); // extraction function
};
public:
typedef typename Reader::Handle Handle; ///< Handle type requested by the reader
- connector::ActiveOutput output; ///< Output connector to which the data recevied is writtten
+ connector::ActiveOutput output; ///< Output connector to which the data received is written
ActiveSocketReader(Handle handle); ///< Create new reader for the given handle
/**< Data will be read from \a handle and be parsed by \a
Reader.
\param[in] handle Handle to read data from */
+
+ private:
+ void read();
+
+ Handle handle_;
+ IOEvent event_;
+ Reader reader_;
};
}}}
///////////////////////////////hh.e////////////////////////////////////////
//#include "SocketReader.cci"
-//#include "SocketReader.ct"
+#include "SocketReader.ct"
//#include "SocketReader.cti"
#endif
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
// compile-command: "scons -u test"
+// comment-column: 40
// End: