3 #include <nexus/udp.hpp>
4 #include <nexus/quic/client.hpp>
15 quic::detail::engine_impl engine;
16 quic::detail::socket_impl socket;
22 client(udp::socket&& socket, ssl::context& ctx);
25 client(udp::socket&& socket, ssl::context& ctx,
46 const udp::endpoint& endpoint,
47 const char* hostname);
60 quic::detail::connection_impl impl;
72 const char* hostname) : impl(c.socket) {
73 c.
connect(*
this, endpoint, hostname);
93 template <
typename CompletionToken>
95 return impl.async_connect<
stream>(s, std::forward<CompletionToken>(token));
an HTTP/3 connection that can initiate outgoing streams and accept server-pushed streams
Definition: client.hpp:57
void go_away(error_code &ec)
send a GOAWAY frame and stop initiating or accepting new streams
client_connection(client &c, const udp::endpoint &endpoint, const char *hostname)
open a connection to the given remote endpoint and hostname. this initiates the TLS handshake,...
Definition: client.hpp:71
void go_away()
This is an overloaded member function, provided for convenience. It differs from the above function o...
client_connection(client &c)
construct a client-side connection for use with connect()
Definition: client.hpp:66
quic::connection_id id(error_code &ec) const
return the connection id if open
quic::detail::connection_impl::executor_type executor_type
the polymorphic executor type, boost::asio::any_io_executor
Definition: client.hpp:63
void close()
This is an overloaded member function, provided for convenience. It differs from the above function o...
executor_type get_executor() const
return the associated io executor
void connect(stream &s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void connect(stream &s, error_code &ec)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void close(error_code &ec)
close the connection, along with any related streams
udp::endpoint remote_endpoint(error_code &ec) const
return the remote's address/port if open
bool is_open() const
determine whether the connection is open
quic::connection_id id() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
decltype(auto) async_connect(stream &s, CompletionToken &&token)
open an outgoing stream
Definition: client.hpp:94
udp::endpoint remote_endpoint() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
an HTTP/3 client that owns a UDP socket and uses it to service client connections
Definition: client.hpp:13
client(const executor_type &ex, const udp::endpoint &endpoint, ssl::context &ctx, const quic::settings &s)
construct the client and bind a UDP socket to the given endpoint
client(udp::socket &&socket, ssl::context &ctx)
construct the client, taking ownership of a bound UDP socket
void close(error_code &ec)
close the socket, along with any related connections
udp::endpoint local_endpoint() const
return the socket's locally-bound address/port
quic::detail::engine_impl::executor_type executor_type
the polymorphic executor type, boost::asio::any_io_executor
Definition: client.hpp:19
executor_type get_executor() const
return the associated io executor
void close()
This is an overloaded member function, provided for convenience. It differs from the above function o...
void connect(client_connection &conn, const udp::endpoint &endpoint, const char *hostname)
open a connection to the given remote endpoint and hostname. this initiates the TLS handshake,...
client(udp::socket &&socket, ssl::context &ctx, const quic::settings &s)
construct the client, taking ownership of a bound UDP socket
client(const executor_type &ex, const udp::endpoint &endpoint, ssl::context &ctx)
construct the client and bind a UDP socket to the given endpoint
a bidirectional HTTP/3 stream that can send and receive HTTP headers, and meets the type requirements...
Definition: stream.hpp:14
an opaque connection id string
Definition: connection_id.hpp:12
HTTP/3 library.
Definition: client.hpp:6
quic transport settings used to initialize a client or server
Definition: settings.hpp:16