senf::WritePolicyBase Struct Reference

Policy defining the writability. More...

#include <senf/Socket/SocketPolicy.hh>

Inheritance diagram for senf::WritePolicyBase:

Classes

class  Buffer
 

Public Member Functions

virtual ~WritePolicyBase ()
 

Detailed Description

Policy defining the writability.

The WritePolicy defines, whether the socket is writable. It may define two members:

method unsigned write(FileHandle, char * buffer, unsigned size) read data from socket
method unsigned writeto(FileHandle, char * buffer, unsigned size, Address &) read data from unconnected socket
type Buffer queue buffer type (a boost::iterator_range)
method boost::optional<Buffer> allocate() allocate write buffer in tx queue
method void enqueue(Buffer const & buffer, unsigned size) prepare write buffer for sending
method void send() send all allocated buffers

The second member should only be enabled if the communication policy is UnconnectedCommunicationPolicy (otherwise it does not make sense since the communication partner is fixed) (see AddressingPolicyBase on how to do this).

The second set of members is special: It provides access to the linux specific packet queue API.

See also
The Policy Framework

Definition at line 373 of file SocketPolicy.hh.

Constructor & Destructor Documentation

◆ ~WritePolicyBase()

senf::WritePolicyBase::~WritePolicyBase ( )
virtual

Definition at line 38 of file SocketPolicy.cc.


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