submitShutdownNotice

Signals to the client that the server started graceful shutdown procedure.

This function is only usable for server. If this function is called with client side session, this function returns ErrorCode.INVALID_STATE.

To gracefully shutdown HTTP/2 session, server should call this function to send GOAWAY with last_stream_id (1u << 31) - 1. And after some delay (e.g., 1 RTT), send another GOAWAY with the stream ID that the server has some processing using submitGoAway(). See also getLastProcStreamID().

Unlike submitGoAway(), this function just sends GOAWAY and does nothing more. This is a mere indication to the client that session shutdown is imminent. The application should call submitGoAway() with appropriate last_stream_id after this call.

If one or more GOAWAY frame have been already sent by either submitGoAway() or terminateSession(), this function has no effect.

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

ErrorCode.NOMEM Out of memory. ErrorCode.INVALID_STATE The Session is initialized as client.

submitShutdownNotice

Meta