Nexus HTTP/3
A QUIC and HTTP/3 library
Public Types | Public Member Functions | List of all members
nexus::quic::client Class Reference

a generic QUIC client that owns a UDP socket and uses it to service client connections More...

#include <nexus/quic/client.hpp>

Public Types

using executor_type = detail::engine_impl::executor_type
 the polymorphic executor type, boost::asio::any_io_executor
 

Public Member Functions

 client (udp::socket &&socket, ssl::context &ctx)
 construct the client, taking ownership of a bound UDP socket
 
 client (udp::socket &&socket, ssl::context &ctx, const 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
 
 client (const executor_type &ex, const udp::endpoint &endpoint, ssl::context &ctx, const settings &s)
 construct the client and bind a UDP socket to the given endpoint
 
executor_type get_executor () const
 return the associated io executor
 
udp::endpoint local_endpoint () const
 return the socket's locally-bound address/port
 
void connect (connection &conn, const udp::endpoint &endpoint, const char *hostname)
 open a connection to the given remote endpoint and hostname. this initiates the TLS handshake, but returns immediately without waiting for the handshake to complete
 
void close (error_code &ec)
 close the socket, along with any related connections
 
void close ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

a generic QUIC client that owns a UDP socket and uses it to service client connections