senf::ppi::TargetDgramWriter< HandleType > Class Template Reference

Writer sending data with ClientSocketHandle::writeto() More...

#include <senf/PPI/SocketSink.hh>

Public Types

typedef HandleType Handle
 
typedef Packet PacketType
 

Public Member Functions

 TargetDgramWriter ()
 Create TargetDgramWriter with unset target address. More...
 
 TargetDgramWriter (typename Handle::Address const &target)
 Create TargetDgramWriter sending to target. More...
 
Handle::Address target () const
 Get current target address. More...
 
void target (typename Handle::Address const &target)
 Set target address. More...
 
bool operator() (Handle &handle, Packet const &packet)
 Write packet to handle. More...
 

Detailed Description

template<class HandleType>
class senf::ppi::TargetDgramWriter< HandleType >

Writer sending data with ClientSocketHandle::writeto()

This writer will send out data using ClientSocketHandle::writeto(). The target address can be specified in the writer constructor and can be adjusted at any time.

If no target address is set, incoming data will be silently dropped.

Definition at line 71 of file SocketSink.hh.

Member Typedef Documentation

◆ Handle

template<class HandleType >
typedef HandleType senf::ppi::TargetDgramWriter< HandleType >::Handle

Definition at line 74 of file SocketSink.hh.

◆ PacketType

template<class HandleType >
typedef Packet senf::ppi::TargetDgramWriter< HandleType >::PacketType

Definition at line 75 of file SocketSink.hh.

Constructor & Destructor Documentation

◆ TargetDgramWriter() [1/2]

template<class HandleType >
senf::ppi::TargetDgramWriter< HandleType >::TargetDgramWriter ( )

Create TargetDgramWriter with unset target address.

◆ TargetDgramWriter() [2/2]

template<class HandleType >
senf::ppi::TargetDgramWriter< HandleType >::TargetDgramWriter ( typename Handle::Address const &  target)

Create TargetDgramWriter sending to target.

Member Function Documentation

◆ operator()()

template<class HandleType >
bool senf::ppi::TargetDgramWriter< HandleType >::operator() ( Handle handle,
Packet const &  packet 
)

Write packet to handle.

Write the complete packet as a datagram to handle.

Parameters
[in]handleHandle to write data to
[in]packetPacket to write

◆ target() [1/2]

template<class HandleType >
Handle::Address senf::ppi::TargetDgramWriter< HandleType >::target ( ) const

Get current target address.

◆ target() [2/2]

template<class HandleType >
void senf::ppi::TargetDgramWriter< HandleType >::target ( typename Handle::Address const &  target)

Set target address.


The documentation for this class was generated from the following file: