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. If NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET is 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_SET is 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_close2 to nghttp3_callbacks.stream_close.

This function returns 0 if it succeeds, or one of the following negative error codes:

NGHTTP3_ERR_STREAM_NOT_FOUND

Stream not found.

NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM

A critical stream is closed.

NGHTTP3_ERR_CALLBACK_FAILURE

User callback failed

Added in version 1.18.0.