tcp_transport class
#include <nxtio/net.hpp>
Async TCP transport with the read/write shape used by HTTP helpers.
Constructors, destructors, conversion operators
- tcp_transport(coro::net::tcp::client client) explicit
- Wrap an already-connected libcoro TCP client.
Public functions
-
auto read_some(std::
span<char> dst) → nxt:: task<std:: size_t> - Read bytes into
dst. -
auto read_some(std::
span<char> dst, std:: stop_token stop) → nxt:: task<std:: size_t> - Read bytes into
dst, checkingstopwhile waiting. -
auto write_all(std::
string_view bytes) → nxt:: task - Write all bytes to the socket.