2 nghttp2_submit_shutdown_notice
3 ==============================
8 *#include <nghttp2/nghttp2.h>*
10 .. function:: int nghttp2_submit_shutdown_notice(nghttp2_session *session)
13 Signals to the client that the server started graceful shutdown
16 This function is only usable for server. If this function is
17 called with client side session, this function returns
18 :macro:`NGHTTP2_ERR_INVALID_STATE`.
20 To gracefully shutdown HTTP/2 session, server should call this
21 function to send GOAWAY with last_stream_id (1u << 31) - 1. And
22 after some delay (e.g., 1 RTT), send another GOAWAY with the stream
23 ID that the server has some processing using
24 `nghttp2_submit_goaway()`. See also
25 `nghttp2_session_get_last_proc_stream_id()`.
27 Unlike `nghttp2_submit_goaway()`, this function just sends GOAWAY
28 and does nothing more. This is a mere indication to the client
29 that session shutdown is imminent. The application should call
30 `nghttp2_submit_goaway()` with appropriate last_stream_id after
33 If one or more GOAWAY frame have been already sent by either
34 `nghttp2_submit_goaway()` or `nghttp2_session_terminate_session()`,
35 this function has no effect.
37 This function returns 0 if it succeeds, or one of the following
40 :macro:`NGHTTP2_ERR_NOMEM`
42 :macro:`NGHTTP2_ERR_INVALID_STATE`
43 The *session* is initialized as client.