Best practice to close QUIC stream and delete app object after peer-initiated RESET_STREAM (ngtcp2 + nghttp3)
#409
-
|
Context
Questions
What I want to confirm
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
RESET_STREAM from a remote endpoint means that it stops sending stream data on that stream, and cancels all unacknowledged data. This is equivalent for the receiver (in this case, client) to call ngtcp2_conn_shutdown_stream_read(), so in this case, you do not need to call ngtcp2_conn_shutdown_stream_read yourself. If you have not send stream fin to server, you should call ngtcp2_conn_shutdown_stream_write, which will send RESET_STREAM to the remote endpoint. After the packet is acknowledged by the remote endpoint, the stream is closed, and stream_close callback will be invoked. |
Beta Was this translation helpful? Give feedback.
RESET_STREAM from a remote endpoint means that it stops sending stream data on that stream, and cancels all unacknowledged data. This is equivalent for the receiver (in this case, client) to call ngtcp2_conn_shutdown_stream_read(), so in this case, you do not need to call ngtcp2_conn_shutdown_stream_read yourself.
If you have not send stream fin to server, you should call ngtcp2_conn_shutdown_stream_write, which will send RESET_STREAM to the remote endpoint. After the packet is acknowledged by the remote endpoint, the stream is closed, and stream_close callback will be invoked.