nghttp3_conn_close_stream2
Synopsis
#include <nghttp3/nghttp3.h>
-
int nghttp3_conn_close_stream2(nghttp3_conn *conn, uint32_t flags, int64_t stream_id, uint64_t rx_app_error_code, uint64_t tx_app_error_code)
nghttp3_conn_close_stream2()tells the library that a stream identified by stream_id has been closed. IfNGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SETis set in flags, rx_app_error_code is the QUIC application error code that shut down the receiving side of the stream. Similarly,NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SETis set in flags, tx_app_error_code is the QUIC application error code that shut down the sending side of the stream.For stream close callback, prefer
nghttp3_callbacks.stream_close2tonghttp3_callbacks.stream_close.This function returns 0 if it succeeds, or one of the following negative error codes:
NGHTTP3_ERR_STREAM_NOT_FOUNDStream not found.
NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAMA critical stream is closed.
NGHTTP3_ERR_CALLBACK_FAILUREUser callback failed
Added in version 1.18.0.