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

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

#include <senf/PPI/SocketSink.hh>

List of all members.


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 77 of file SocketSink.hh.


Public Types

typedef HandleType  Handle
typedef Packet  PacketType

Public Member Functions

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

Member Typedef Documentation

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

Definition at line 80 of file SocketSink.hh.

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

Definition at line 81 of file SocketSink.hh.


Constructor & Destructor Documentation

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

Create TargetDgramWriter with unset target address.

Definition at line 37 of file SocketSink.cti.

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

Create TargetDgramWriter sending to target.

Definition at line 42 of file SocketSink.cti.


Member Function Documentation

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]  handle  Handle to write data to
[in]  packet  Packet to write

Definition at line 62 of file SocketSink.cti.

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

Set target address.

Definition at line 56 of file SocketSink.cti.

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

Get current target address.

Definition at line 48 of file SocketSink.cti.


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