22 #include <sys/types.h> 23 #include <sys/socket.h> 24 #include <sys/ioctl.h> 38 int sock = ::socket(PF_INET,SOCK_STREAM | SOCK_CLOEXEC, 0);
55 int sock = ::socket(PF_INET,SOCK_STREAM | SOCK_CLOEXEC, 0);
68 if (::listen(
fd(),backlog) < 0)
78 int sock = ::socket(PF_INET6,SOCK_STREAM | SOCK_CLOEXEC, 0);
95 int sock = ::socket(PF_INET6,SOCK_STREAM | SOCK_CLOEXEC, 0);
108 if (::listen(
fd(),backlog) < 0)
void init_client() const
Create unconnected client socket.
ClientSocketHandle< Policy > clientHandle() const
Get client handle for associated socket.
#define SENF_THROW_SYSTEM_EXCEPTION(desc)
bool reuseaddr() const
Return current reuseaddr state.
int fd() const
Get file descriptor.
ServerSocketHandle< Policy > serverHandle() const
Get server handle for associated socket.
TCPv4SocketHandle and TCPv6SocketHandle public header.
void init_client() const
Create unconnected client socket.
void init_server() const
Create server socket.
void init_server() const
Create server socket.