senf::WriteablePolicy Struct Reference
[Policy Implementation classes]

WritePolicy for writeable sockets. More...

#include <senf/Socket/ReadWritePolicy.hh>

Inheritance diagram for senf::WriteablePolicy:
Inheritance graph
[legend]

List of all members.


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 98 of file ReadWritePolicy.hh.


Static Public Member Functions

template<class SPolicy >
static unsigned  write (ClientSocketHandle< SPolicy > &handle, char const *buffer, unsigned size)
  write data to socket
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

Member Function Documentation

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

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]  handle  socket handle to write data to
[in]  buffer  address of buffer to send
[in]  size  number of bytes to write
Returns:
number of bytes written

Definition at line 62 of file ReadWritePolicy.cti.

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

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]  handle  socket handle to write data to
[in]  buffer  address of buffer to send
[in]  size  number of bytes to write
[in]  addr  peer to send data to
Returns:
number of bytes written

Definition at line 79 of file ReadWritePolicy.cti.


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