nxt::io::net namespace

Classes

struct endpoint
Host and port to connect to.
struct resolved_target
DNS resolution result for a target endpoint.
class tcp_transport
Async TCP transport with the read/write shape used by HTTP helpers.
class tls_transport
Async TLS transport with the read/write shape used by HTTP helpers.

Functions

auto connect_tcp(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000}) →  nxt::task<tcp_transport>
Resolve and open a TCP connection to an endpoint.
auto connect_tls(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000}) →  nxt::task<tls_transport>
Resolve, open, and TLS-wrap a connection to an endpoint.
auto resolve_target(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000}) →  nxt::task<resolved_target>
Resolve an endpoint using the scheduler-owned DNS resolver.

Function documentation

nxt::task<tcp_transport> nxt::io::net::connect_tcp(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000})

Resolve and open a TCP connection to an endpoint.

nxt::task<tls_transport> nxt::io::net::connect_tls(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000})

Resolve, open, and TLS-wrap a connection to an endpoint.

nxt::task<resolved_target> nxt::io::net::resolve_target(std::unique_ptr<nxt::scheduler>& sched, endpoint target, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000})

Resolve an endpoint using the scheduler-owned DNS resolver.