27#ifndef PROTOCORE_QUIC_SERVER_H
28#define PROTOCORE_QUIC_SERVER_H
32#if PROTOCORE_ENABLE_HTTP3
39#ifndef PROTOCORE_HTTP3_PORT
40#define PROTOCORE_HTTP3_PORT 443
42#ifndef PROTOCORE_QUIC_SCID_LEN
43#define PROTOCORE_QUIC_SCID_LEN 8
45#ifndef PROTOCORE_QUIC_IDLE_MS
46#define PROTOCORE_QUIC_IDLE_MS 30000
55typedef void (*QuicServerRequestFn)(
void *app, uint32_t conn_id, uint64_t stream_id,
const char *method,
56 const char *path,
const char *authority,
const uint8_t *body,
size_t body_len);
61 const uint8_t *cert_der;
63 uint8_t ed25519_seed[32];
64 void (*rng)(uint8_t *out,
size_t len);
71 const QuicServerConfig *cfg;
72 QuicServerRequestFn on_request;
87 const char *content_type;
116 QuicBeginArgs begin_args;
117 QuicStreamRef stream;
123 void (*
const begin)(uint8_t *work);
124 void (*
const poll)(uint8_t *work);
125 void (*
const respond)(uint8_t *work);
126 void (*
const active_conns)(uint8_t *work);
127 void (*
const stop)(uint8_t *work);
132extern QuicServerNs QuicServer;
143uint8_t *protocore_quic_server_span(
void);
147proto_bool protocore_quic_server_respond(uint32_t conn_id, uint64_t stream_id,
int status,
const char *content_type,
148 const uint8_t *body,
size_t body_len);
HTTP/3 application engine over QUIC streams (RFC 9114).
Stateful QUIC v1 server connection engine (RFC 9000 / RFC 9001).
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS