20 #ifndef HH_SENF_Socket_ReadWritePolicy_ 21 #define HH_SENF_Socket_ReadWritePolicy_ 1 24 #include <sys/socket.h> 47 static unsigned read(
FileHandle & handle,
char * buffer,
unsigned size);
54 template <
class SPolicy>
56 typename SPolicy::AddressingPolicy::Address & address,
57 typename IfCommunicationPolicyIs<
60 template <
class SPolicy>
62 typename Policy::AddressingPolicy::Address & address);
72 static unsigned do_readfrom(
FileHandle & handle,
char * buffer,
unsigned size,
73 struct ::sockaddr * addr, socklen_t * len);
93 template <
class SPolicy>
95 typename IfCommunicationPolicyIs<
98 template <
class SPolicy>
113 template <
class SPolicy>
115 typename boost::call_traits<
116 typename SPolicy::AddressingPolicy::Address>::param_type addr,
117 char const * buffer,
unsigned size,
118 typename IfCommunicationPolicyIs<
121 template <
class SPolicy>
123 typename Policy::AddressingPolicy::Address
const & addr,
124 char const * buffer,
unsigned size);
139 static unsigned do_write(
FileHandle & handle,
char const * buffer,
unsigned size);
140 static unsigned do_writeto(
FileHandle & handle,
char const * buffer,
unsigned size,
141 struct sockaddr
const * addr, socklen_t len);
ClientSocketHandle public header.
CommunicationPolicy public header.
Generic SocketHandle with client interface.
CommunicationPolicy for connected sockets.
Policy Framework public header.
WritePolicy for unwriteable sockets.
WritePolicy for writeable sockets.
static unsigned readfrom(ClientSocketHandle< SPolicy > &handle, char *buffer, unsigned size, typename Policy::AddressingPolicy::Address &address)
read data from socket returning peer address
Basic file handle wrapper.
Policy defining the readability.
ReadPolicy for readable sockets.
ReadPolicy for unreadable sockets.
CommunicationPolicy for unconnected sockets.
static unsigned read(FileHandle &handle, char *buffer, unsigned size)
read data from socket
Policy defining the writability.