ark::net::tcp::acceptor class

special io object available to bond, listen, and accept ark::net::tcp::socket from

Base classes

class ark::nonseekable_fd
An io object, denotes a non lseek()-able fd as defined in kernel.

Public static functions

static auto create(bool use_ipv6 = false) -> result<acceptor> noexcept
constructs an acceptor
static auto create(async_context& ctx, bool use_ipv6 = false) -> result<acceptor> noexcept
constructs an acceptor

Constructors, destructors, conversion operators

acceptor(int fd_int) protected
constructs from int fildes

Function documentation

static result<acceptor> ark::net::tcp::acceptor::create(bool use_ipv6 = false) noexcept

constructs an acceptor

Parameters
use_ipv6 in if set to true, associated bond and accept calls should use ark::net::inet6_address

static result<acceptor> ark::net::tcp::acceptor::create(async_context& ctx, bool use_ipv6 = false) noexcept

constructs an acceptor

Parameters
ctx in bound to this ark::async_context in addition, notice that it would also be bound for accepted sockets
use_ipv6 in if set to true, associated bond and accept calls should use ark::net::inet6_address

ark::net::tcp::acceptor::acceptor(int fd_int) protected

constructs from int fildes

Parameters
fd_int in must be an fildes opened by socket(2)