2 nghttp2_session_terminate_session
3 =================================
8 *#include <nghttp2/nghttp2.h>*
10 .. function:: int nghttp2_session_terminate_session(nghttp2_session *session, uint32_t error_code)
13 Signals the session so that the connection should be terminated.
15 The last stream ID is the minimum value between the stream ID of a
16 stream for which :type:`nghttp2_on_frame_recv_callback` was called
17 most recently and the last stream ID we have sent to the peer
20 The *error_code* is the error code of this GOAWAY frame. The
21 pre-defined error code is one of :macro:`nghttp2_error_code`.
23 After the transmission, both `nghttp2_session_want_read()` and
24 `nghttp2_session_want_write()` return 0.
26 This function should be called when the connection should be
27 terminated after sending GOAWAY. If the remaining streams should
28 be processed after GOAWAY, use `nghttp2_submit_goaway()` instead.
30 This function returns 0 if it succeeds, or one of the following
33 :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`