Policy defining the writability. More...
#include <senf/Socket/SocketPolicy.hh>
Classes | |
class | Buffer |
Public Member Functions | |
virtual | ~WritePolicyBase () |
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.
Definition at line 373 of file SocketPolicy.hh.
|
virtual |
Definition at line 38 of file SocketPolicy.cc.