Nexus HTTP/3
A QUIC and HTTP/3 library
|
a bidirectional HTTP/3 stream that can send and receive HTTP headers, and meets the type requirements of asio's AsyncRead/WriteStream and SyncRead/WriteStream for transferring the HTTP message body More...
#include <nexus/h3/stream.hpp>
Public Member Functions | |
stream (client_connection &conn) | |
construct a stream associated with the given client connection | |
stream (server_connection &conn) | |
construct a stream associated with the given server connection | |
template<typename CompletionToken > | |
decltype(auto) | async_read_headers (fields &f, CompletionToken &&token) |
read headers from the stream | |
void | read_headers (fields &f, error_code &ec) |
read headers from the stream | |
void | read_headers (fields &f) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename CompletionToken > | |
decltype(auto) | async_write_headers (const fields &f, CompletionToken &&token) |
write headers to the stream | |
void | write_headers (const fields &f, error_code &ec) |
write headers to the stream | |
void | write_headers (const fields &f) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
![]() | |
stream (connection &conn) | |
construct a stream associated with the given connection | |
~stream () | |
reset the stream on destruction | |
stream (const stream &)=delete | |
stream & | operator= (const stream &)=delete |
stream (stream &&)=delete | |
stream & | operator= (stream &&)=delete |
executor_type | get_executor () const |
return the associated io executor | |
bool | is_open () const |
determine whether the stream is open | |
stream_id | id (error_code &ec) const |
return the stream identifier if open. for streams initiated locally, an identifier may not be assigned until the first STREAM frame is sent | |
stream_id | id () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename MutableBufferSequence , typename CompletionToken > | |
decltype(auto) | async_read_some (const MutableBufferSequence &buffers, CompletionToken &&token) |
read some bytes into the given buffer sequence | |
template<typename MutableBufferSequence > | |
size_t | read_some (const MutableBufferSequence &buffers, error_code &ec) |
read some bytes into the given buffer sequence | |
template<typename MutableBufferSequence > | |
size_t | read_some (const MutableBufferSequence &buffers) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ConstBufferSequence , typename CompletionToken > | |
decltype(auto) | async_write_some (const ConstBufferSequence &buffers, CompletionToken &&token) |
write some bytes from the given buffer sequence. written bytes may be buffered until they fill an outgoing packet | |
template<typename ConstBufferSequence > | |
size_t | write_some (const ConstBufferSequence &buffers, error_code &ec) |
write some bytes from the given buffer sequence. written bytes may be buffered until they fill an outgoing packet | |
template<typename ConstBufferSequence > | |
size_t | write_some (const ConstBufferSequence &buffers) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | flush (error_code &ec) |
flush any bytes that were buffered by write_some()/async_write_some() but not yet delivered | |
void | flush () |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | shutdown (int how, error_code &ec) |
shut down a stream for reads (0), writes (1), or both (2). shutting down the read side will cancel any pending read operations. shutting down the write side will flush any buffered data, and cancel any pending write operations | |
void | shutdown (int how) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename CompletionToken > | |
decltype(auto) | async_close (CompletionToken &&token) |
close the stream gracefully, blocking until all written data is acknowledged by the peer. the associated connection must remain open until this graceful shutdown completes | |
void | close (error_code &ec) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | close () |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | reset () |
reset the stream immediately in both directions, canceling any pending operations and discarding any unacked data | |
Additional Inherited Members | |
![]() | |
using | executor_type = detail::stream_impl::executor_type |
the polymorphic executor type, boost::asio::any_io_executor | |
![]() | |
stream (detail::connection_impl &impl) | |
![]() | |
detail::stream_impl | impl |
a bidirectional HTTP/3 stream that can send and receive HTTP headers, and meets the type requirements of asio's AsyncRead/WriteStream and SyncRead/WriteStream for transferring the HTTP message body