cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
http3_client.h
Go to the documentation of this file.
1
10#ifndef __CWIST_HTTP3_CLIENT_H__
11#define __CWIST_HTTP3_CLIENT_H__
12
13#include <cwist/net/http/http.h>
15#include <stddef.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
25
31
44int cwist_http3_client_set_server(cwist_http3_client *client, const char *host, uint16_t port);
45
54int cwist_http3_client_set_ca_bundle(cwist_http3_client *client, const char *ca_path);
55
66
72void cwist_http3_client_set_timeout_ms(cwist_http3_client *client, int timeout_ms);
73
83void cwist_http3_client_enable_0rtt(cwist_http3_client *client, int enabled);
84
95
106void cwist_http3_client_set_max_retries(cwist_http3_client *client, int max_retries);
107
118
129
155 cwist_http_method_t method,
156 cwist_http_header_node *headers, const char *body,
157 size_t body_len, cwist_http_response **out_response);
158
175int cwist_http3_client_send_datagram(cwist_http3_client *client, const void *data, size_t len);
176
188ssize_t cwist_http3_client_recv_datagram(cwist_http3_client *client, void *buf, size_t len);
189
215 cwist_http_method_t method,
216 cwist_http_header_node *headers, const char *body,
217 size_t body_len, cwist_http_response **out_response);
218
235int cwist_http3_client_send_datagram(cwist_http3_client *client, const void *data, size_t len);
236
248ssize_t cwist_http3_client_recv_datagram(cwist_http3_client *client, void *buf, size_t len);
249
255void cwist_http3_client_set_max_retries(cwist_http3_client *client, int max_retries);
256
258
260
263#ifdef __cplusplus
264}
265#endif
266
267#endif
ssize_t cwist_http3_client_recv_datagram(cwist_http3_client *client, void *buf, size_t len)
Receive an unreliable QUIC datagram.
void cwist_http3_client_set_conn_timeout_ms(cwist_http3_client *client, int timeout_ms)
Set the connection establishment / stream creation timeout.
int cwist_http3_client_send_datagram(cwist_http3_client *client, const void *data, size_t len)
Send an unreliable QUIC datagram.
cwist_error_t cwist_http3_client_request(cwist_http3_client *client, const char *path, cwist_http_method_t method, cwist_http_header_node *headers, const char *body, size_t body_len, cwist_http_response **out_response)
Perform a synchronous HTTP/3 request.
int cwist_http3_client_set_ca_bundle(cwist_http3_client *client, const char *ca_path)
Load CA bundle for TLS certificate verification.
void cwist_http3_client_enable_datagrams(cwist_http3_client *client, int enabled)
Enable or disable QUIC datagram support (RFC 9221).
void cwist_http3_client_set_insecure(cwist_http3_client *client, int enabled)
Disable or re-enable TLS certificate verification.
int cwist_http3_client_set_server(cwist_http3_client *client, const char *host, uint16_t port)
Set server address for subsequent requests.
void cwist_http3_client_set_timeout_ms(cwist_http3_client *client, int timeout_ms)
Set request timeout in milliseconds.
void cwist_http3_client_set_max_retries(cwist_http3_client *client, int max_retries)
Set the maximum number of request retries on transient failure.
void cwist_http3_client_enable_0rtt(cwist_http3_client *client, int enabled)
Enable or disable 0-RTT session resumption.
void cwist_http3_client_set_retry_delay_ms(cwist_http3_client *client, int delay_ms)
Set the base delay between retries in milliseconds.
cwist_http3_client * cwist_http3_client_create(void)
struct cwist_http3_client cwist_http3_client
Opaque HTTP/3 client handle.
void cwist_http3_client_destroy(cwist_http3_client *client)
cwist_http_method_t
Definition http.h:16
HTTP Protocol Definitions and Helpers.
Integrated error structure used throughout the system.
Definition cwist_err.h:72
Linked list for headers to handle multiple headers easily.
Definition http.h:59
HTTP Response Object. Supports standard string body or Zero-Copy pointer body.
Definition http.h:82
Unified error code and type definitions for the CWIST system layer.