#define HH_SocketWriter_ 1
// Custom includes
-#include "Packets/Packets.hh"
-#include "Socket/ClientSocketHandle.hh"
-#include "Socket/SocketPolicy.hh"
-#include "Socket/ReadWritePolicy.hh"
-#include "Socket/FramingPolicy.hh"
-#include "Socket/CommunicationPolicy.hh"
+#include "../Packets/Packets.hh"
+#include "../Socket/ClientSocketHandle.hh"
+#include "../Socket/SocketPolicy.hh"
+#include "../Socket/ReadWritePolicy.hh"
+#include "../Socket/FramingPolicy.hh"
+#include "../Socket/CommunicationPolicy.hh"
#include "Module.hh"
#include "Connectors.hh"
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
{
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
*/
template <class Writer=PacketWriter>
class ActiveSocketWriter : public Module
{
+ SENF_PPI_MODULE(ActiveSocketWriter);
+
public:
typedef typename Writer::Handle Handle; ///< Handle type requested by writer
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
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
*/
template <class Writer=PacketWriter>
class PassiveSocketWriter : public Module
{
+ SENF_PPI_MODULE(PassiveSocketWriter);
+
public:
typedef typename Writer::Handle Handle; ///< Handle type requested by writer