
ngtcp2_conn_shutdown_stream_write
=================================

Synopsis
--------

*#include <ngtcp2/ngtcp2.h>*

.. function:: int ngtcp2_conn_shutdown_stream_write(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id, uint64_t app_error_code)

    
    `ngtcp2_conn_shutdown_stream_write` closes write-side of a stream
    denoted by *stream_id* abruptly.  *app_error_code* is one of
    application error codes, and indicates the reason of shutdown.  If
    this function succeeds, no further application data is sent to the
    remote endpoint.  It discards all data which has not been
    acknowledged yet.
    
    *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:
    
    :macro:`NGTCP2_ERR_NOMEM`
        Out of memory
    :macro:`NGTCP2_ERR_INVALID_ARGUMENT`
        *stream_id* refers to a remote unidirectional stream.
