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})
#include <nxtio/net.hpp>
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})
#include <nxtio/net.hpp>
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})
#include <nxtio/net.hpp>
Resolve an endpoint using the scheduler-owned DNS resolver.