ark::net::tcp namespace

implements TCP/IP related classes and functions

Contents

Namespaces

namespace async
contains apis that invokes a given ark::callback on completion
namespace coro
contains apis that returns an Awaitable
namespace sync
contains apis that blocks until completion

Classes

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

Functions

auto bind(acceptor& f, const address& endpoint) -> result<void> noexcept
bind acceptor to the given endpoint
auto listen(acceptor& f, int backlog = numeric_limits<int>::max()) -> result<void> noexcept
make acceptor start to accept connections

Function documentation

result<void> ark::net::tcp::bind(acceptor& f, const address& endpoint) noexcept

bind acceptor to the given endpoint

see bind(2)

won't block

result<void> ark::net::tcp::listen(acceptor& f, int backlog = numeric_limits<int>::max()) noexcept

make acceptor start to accept connections

see listen(2)

won't block