WritePolicy for writeable sockets. More...

#include <senf/Socket/ReadWritePolicy.hh>

Inheritance diagram for senf::WriteablePolicy:

Static Public Member Functions

template<class SPolicy >
static unsigned write (ClientSocketHandle< SPolicy > &handle, char const *buffer, unsigned size)
 write data to socket More...
 
template<class SPolicy >
static unsigned writeto (ClientSocketHandle< SPolicy > &handle, typename Policy::AddressingPolicy::Address const &addr, char const *buffer, unsigned size)
 write data to socket sending to given peer More...
 

Additional Inherited Members

- Public Member Functions inherited from senf::WritePolicyBase
virtual ~WritePolicyBase ()
 

Detailed Description

WritePolicy for writeable sockets.

This policy provides support for writable sockets via the standard UNIX write/sendto system calls. The concrete semantics of the write calls depend on the framing policy of the socket.

Definition at line 90 of file ReadWritePolicy.hh.

Member Function Documentation

◆ write()

template<class SPolicy >
static unsigned senf::WriteablePolicy::write ( ClientSocketHandle< SPolicy > &  handle,
char const *  buffer,
unsigned  size 
)
static

write data to socket

This member is only enabled if the socket uses connected communication. Otherwise the communication partner must be specified explicitly using the sendto call

Parameters
[in]handlesocket handle to write data to
[in]bufferaddress of buffer to send
[in]sizenumber of bytes to write
Returns
number of bytes written

◆ writeto()

template<class SPolicy >
static unsigned senf::WriteablePolicy::writeto ( ClientSocketHandle< SPolicy > &  handle,
typename Policy::AddressingPolicy::Address const &  addr,
char const *  buffer,
unsigned  size 
)
static

write data to socket sending to given peer

This member is only enabled if the socket uses unconnected communication. Otherwise no target may be specified since it is implied in the connection.

Parameters
[in]handlesocket handle to write data to
[in]bufferaddress of buffer to send
[in]sizenumber of bytes to write
[in]addrpeer to send data to
Returns
number of bytes written

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