dot-xx
A personal collection of small C++ modules
Loading...
Searching...
No Matches
dxx::http::PendingConnection< TResponse > Class Template Referenceexport
module dxx.http

An awaitable object that allows the handler code to respond to the request at a later point in time. More...

Public Types

using Response = TResponse

Public Member Functions

 PendingConnection (bool c_owned)
 PendingConnection (const PendingConnection &)=delete
PendingConnectionoperator= (const PendingConnection &)=delete
 PendingConnection (PendingConnection &&other)
PendingConnectionoperator= (PendingConnection &&other)
bool await_ready () const noexcept
void await_suspend (std::coroutine_handle<> h)
Response & emplace (auto &&arg)
Response & emplace (auto &&... args)
void respond ()
void respond_with (auto &&... args)
const std::optional< Response > & await_resume () const
void own (auto &&coro_task)
 Take ownership of a coroutine handle from the task.
constexpr auto operator<=> (const PendingConnection &other)

Detailed Description

template<typename TResponse>
class dxx::http::PendingConnection< TResponse >

An awaitable object that allows the handler code to respond to the request at a later point in time.

Template Parameters
TResponseresponse data type

Member Function Documentation

◆ own()

template<typename TResponse>
void dxx::http::PendingConnection< TResponse >::own ( auto && coro_task)
inline

Take ownership of a coroutine handle from the task.

This is horrible API


The documentation for this class was generated from the following file:
  • /build-llvm-libcpp/_deps/dot-xx-http-src/src/coro.xx