3 #include <nexus/quic/connection_id.hpp>
4 #include <nexus/quic/detail/connection_impl.hpp>
18 friend class detail::socket_impl;
19 detail::connection_impl impl;
52 template <
typename CompletionToken>
54 return impl.async_connect<
stream>(s, std::forward<CompletionToken>(token));
62 template <
typename CompletionToken>
64 return impl.async_accept<
stream>(s, std::forward<CompletionToken>(token));
a generic QUIC acceptor that owns a UDP socket and uses it to accept and service incoming connections
Definition: server.hpp:39
a generic QUIC client that owns a UDP socket and uses it to service client connections
Definition: client.hpp:15
an opaque connection id string
Definition: connection_id.hpp:12
a generic QUIC connection that can initiate outgoing streams and accept incoming streams
Definition: connection.hpp:14
decltype(auto) async_connect(stream &s, CompletionToken &&token)
open an outgoing stream
Definition: connection.hpp:53
connection(acceptor &a)
construct a server-side connection for use with accept()
void connect(stream &s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
connection_id id() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void accept(stream &s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void go_away()
This is an overloaded member function, provided for convenience. It differs from the above function o...
decltype(auto) async_accept(stream &s, CompletionToken &&token)
accept an incoming stream
Definition: connection.hpp:63
udp::endpoint remote_endpoint(error_code &ec) const
return the remote's address/port if open
void connect(stream &s, error_code &ec)
This is an overloaded member function, provided for convenience. It differs from the above function o...
connection(client &c)
construct a client-side connection for use with connect()
void close(error_code &ec)
close the connection, along with any related streams
void close()
This is an overloaded member function, provided for convenience. It differs from the above function o...
detail::connection_impl::executor_type executor_type
the polymorphic executor type, boost::asio::any_io_executor
Definition: connection.hpp:22
connection_id id(error_code &ec) const
return the connection id if open
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,...
void go_away(error_code &ec)
stop initiating or accepting new streams
executor_type get_executor() const
return the associated io executor
udp::endpoint remote_endpoint() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool is_open() const
determine whether the connection is open
void accept(stream &s, error_code &ec)
This is an overloaded member function, provided for convenience. It differs from the above function o...
a generic bidirectional QUIC stream that meets the type requirements of asio's AsyncRead/WriteStream ...
Definition: stream.hpp:21
Generic QUIC library.
Definition: client.hpp:8