42#ifndef __CWIST_NET_HTTP_ASYNC_H__
43#define __CWIST_NET_HTTP_ASYNC_H__
118 const void *body,
size_t len);
void cwist_async_dispatch_ack(cwist_async *a)
Internal: on the dispatch thread, after all middleware has unwound. Call exactly once; do not touch t...
bool cwist_async_respond_with(cwist_async *a, cwist_http_response *res)
Complete the exchange with a caller-built response. On success the framework takes ownership of res (...
cwist_async * cwist_async_retain(cwist_async *a)
Retain a live handle for a producer that may outlive completion. Must be called while the caller alre...
bool cwist_async_respond(cwist_async *a, cwist_http_status_t status, const char *content_type, const void *body, size_t len)
Complete the exchange with a simple body response. Thread-safe and one-shot: the first of respond/res...
void cwist_async_set_timeout(cwist_async *a, uint64_t ms)
Answer with a 504 Gateway Timeout if the exchange is still pending after ms milliseconds....
bool cwist_async_abort(cwist_async *a, cwist_http_status_t status)
Complete the exchange with an error status and close the connection.
void cwist_async_wait_dispatched(cwist_async *a)
Wait until dispatch has acknowledged the handoff of a.
cwist_async * cwist_async_defer(cwist_http_request *req, cwist_http_response *res)
Defer the response for the current request.
void cwist_async_release(cwist_async *a)
Release a reference acquired with cwist_async_retain(). Does not complete or abort the exchange....
struct cwist_async cwist_async
HTTP Protocol Definitions and Helpers.
HTTP Response Object. Supports standard string body or Zero-Copy pointer body.