@@ -722,6 +722,16 @@ NGHTTP3_EXTERN void nghttp3_buf_reset(nghttp3_buf *buf);
722722 */
723723#define NGHTTP3_NV_FLAG_NO_COPY_VALUE 0x04u
724724
725+ /**
726+ * @macro
727+ *
728+ * :macro:`NGHTTP3_NV_FLAG_TRY_INDEX` gives a hint to QPACK encoder to
729+ * index a header field which is not indexed by default. This is just
730+ * a hint, and QPACK encoder might not encode the field in various
731+ * reasons.
732+ */
733+ #define NGHTTP3_NV_FLAG_TRY_INDEX 0x08u
734+
725735/**
726736 * @struct
727737 *
@@ -1071,8 +1081,8 @@ typedef struct nghttp3_qpack_nv {
10711081 nghttp3_rcbuf * value ;
10721082 /**
10731083 * :member:`token` is :type:`nghttp3_qpack_token` value of
1074- * :member:`name`. It could be -1 if we have no token for that
1075- * header field name.
1084+ * :member:`name`. It could be -1 if we have no token for that
1085+ * header field name.
10761086 */
10771087 int32_t token ;
10781088 /**
@@ -1804,8 +1814,8 @@ typedef int (*nghttp3_reset_stream)(nghttp3_conn *conn, int64_t stream_id,
18041814typedef int (* nghttp3_shutdown )(nghttp3_conn * conn , int64_t id ,
18051815 void * conn_user_data );
18061816
1807- #define NGHTTP3_CALLBACKS_VERSION_V1 1
1808- #define NGHTTP3_CALLBACKS_VERSION NGHTTP3_CALLBACKS_VERSION_V1
1817+ #define NGHTTP3_CALLBACKS_V1 1
1818+ #define NGHTTP3_CALLBACKS_VERSION NGHTTP3_CALLBACKS_V1
18091819
18101820/**
18111821 * @struct
@@ -1889,8 +1899,8 @@ typedef struct nghttp3_callbacks {
18891899 nghttp3_shutdown shutdown ;
18901900} nghttp3_callbacks ;
18911901
1892- #define NGHTTP3_SETTINGS_VERSION_V1 1
1893- #define NGHTTP3_SETTINGS_VERSION NGHTTP3_SETTINGS_VERSION_V1
1902+ #define NGHTTP3_SETTINGS_V1 1
1903+ #define NGHTTP3_SETTINGS_VERSION NGHTTP3_SETTINGS_V1
18941904
18951905/**
18961906 * @struct
@@ -1924,11 +1934,15 @@ typedef struct nghttp3_settings {
19241934 size_t qpack_blocked_streams ;
19251935 /**
19261936 * :member:`enable_connect_protocol`, if set to nonzero, enables
1927- * Extended CONNECT Method (see
1928- * https://www.ietf.org/archive/id/draft-ietf-httpbis-h3-websockets-00.html).
1929- * Client ignores this field.
1937+ * Extended CONNECT Method (see :rfc:`9220`). Client ignores this
1938+ * field.
19301939 */
19311940 int enable_connect_protocol ;
1941+ /**
1942+ * :member:`h3_datagram`, if set to nonzero, enables HTTP/3
1943+ * Datagrams (see :rfc:`9297`).
1944+ */
1945+ int h3_datagram ;
19321946} nghttp3_settings ;
19331947
19341948/**
@@ -2359,7 +2373,7 @@ NGHTTP3_EXTERN int nghttp3_conn_submit_shutdown_notice(nghttp3_conn *conn);
23592373 * called after `nghttp3_conn_submit_shutdown_notice` and a couple of
23602374 * RTT. After calling this function, the local endpoint starts
23612375 * rejecting new incoming streams. The existing streams are processed
2362- * normally.
2376+ * normally. See also `nghttp3_conn_is_drained`.
23632377 */
23642378NGHTTP3_EXTERN int nghttp3_conn_shutdown (nghttp3_conn * conn );
23652379
@@ -2546,6 +2560,15 @@ NGHTTP3_EXTERN int nghttp3_http_parse_priority(nghttp3_pri *dest,
25462560 const uint8_t * value ,
25472561 size_t len );
25482562
2563+ /**
2564+ * @function
2565+ *
2566+ * `nghttp3_conn_is_drained` returns nonzero if
2567+ * `nghttp3_conn_shutdown` has been called, and there is no active
2568+ * remote streams. This function is for server use only.
2569+ */
2570+ NGHTTP3_EXTERN int nghttp3_conn_is_drained (nghttp3_conn * conn );
2571+
25492572/**
25502573 * @macrosection
25512574 *
0 commit comments