@@ -624,7 +624,7 @@ typedef struct nghttp3_buf {
624624 */
625625 uint8_t * end ;
626626 /**
627- * :member:`pos` pointers to the start of data. Typically, this
627+ * :member:`pos` points to the start of data. Typically, this
628628 * points to the address that next data should be read. Initially,
629629 * it points to :member:`begin`.
630630 */
@@ -2198,6 +2198,9 @@ NGHTTP3_EXTERN int nghttp3_conn_add_write_offset(nghttp3_conn *conn,
21982198 * If a stream denoted by |stream_id| is not found, this function
21992199 * returns 0.
22002200 *
2201+ * Alternatively, `nghttp3_conn_update_ack_offset` can be used to
2202+ * accomplish the same thing.
2203+ *
22012204 * This function returns 0 if it succeeds, or one of the following
22022205 * negative error codes:
22032206 *
@@ -2207,6 +2210,31 @@ NGHTTP3_EXTERN int nghttp3_conn_add_write_offset(nghttp3_conn *conn,
22072210NGHTTP3_EXTERN int nghttp3_conn_add_ack_offset (nghttp3_conn * conn ,
22082211 int64_t stream_id , uint64_t n );
22092212
2213+ /**
2214+ * @function
2215+ *
2216+ * `nghttp3_conn_update_ack_offset` tells |conn| that QUIC stack has
2217+ * acknowledged the stream data up to |offset| for a stream denoted by
2218+ * |stream_id|.
2219+ *
2220+ * If a stream denoted by |stream_id| is not found, this function
2221+ * returns 0.
2222+ *
2223+ * Alternatively, `nghttp3_conn_add_ack_offset` can be used to
2224+ * accomplish the same thing.
2225+ *
2226+ * This function returns 0 if it succeeds, or one of the following
2227+ * negative error codes:
2228+ *
2229+ * :macro:`NGHTTP3_ERR_INVALID_ARGUMENT`
2230+ * |offset| is less than the number of bytes acknowledged so far.
2231+ * :macro:`NGHTTP3_ERR_CALLBACK_FAILURE`
2232+ * User callback failed.
2233+ */
2234+ NGHTTP3_EXTERN int nghttp3_conn_update_ack_offset (nghttp3_conn * conn ,
2235+ int64_t stream_id ,
2236+ uint64_t offset );
2237+
22102238/**
22112239 * @function
22122240 *
0 commit comments