ngtcp2_conn_shutdown_stream

Synopsis

#include <ngtcp2/ngtcp2.h>

int ngtcp2_conn_shutdown_stream(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id, uint64_t app_error_code)

ngtcp2_conn_shutdown_stream() closes a stream denoted by stream_id abruptly. app_error_code is one of application error codes, and indicates the reason of shutdown. Successful call of this function does not immediately erase the state of the stream. The actual deletion is done when the remote endpoint sends acknowledgement. Calling this function is equivalent to call ngtcp2_conn_shutdown_stream_read(), and ngtcp2_conn_shutdown_stream_write() sequentially with the following differences. If stream_id refers to a local unidirectional stream, this function only shutdowns write side of the stream. If stream_id refers to a remote unidirectional stream, this function only shutdowns read side of the stream.

flags is currently unused, and should be set to 0.

This function returns 0 if a stream denoted by stream_id is not found.

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

NGTCP2_ERR_NOMEM

Out of memory