SSL_stream_reset3ssl
Reset a quic stream
Usage
#include <openssl/ssl.h>typedef struct ssl_stream_reset_args_st {uint64_t quic_error_code;} SSL_STREAM_RESET_ARGS;int SSL_stream_reset(SSL *ssl,const SSL_STREAM_RESET_ARGS *args,size_t args_len);
Overview
The SSL_stream_reset() function resets the send part of a QUIC stream when called on a QUIC stream SSL object, or on a QUIC connection SSL object with a default stream attached.
If args is non-NULL, args_len must be set to sizeof(*args).
quic_error_code is an application-specified error code, which must be in the range [0, 2**62-1]. If args is NULL, a value of 0 is used.
Resetting a stream indicates to an application that the sending part of the stream is terminating abnormally. When a stream is reset, the implementation does not guarantee that any data already passed to SSL_write(3) will be received by the peer, and data already passed to SSL_write(3) but not yet transmitted may or may not be discarded. As such, you should only reset a stream when the information transmitted on the stream no longer matters, for example due to an error condition.
This function cannot be called on a unidirectional stream initiated by the peer, as only the sending side of a stream can initiate a stream reset.
It is also possible to trigger a stream reset by calling SSL_free(3); see the documentation for SSL_free(3) for details.
The receiving part of the stream (for bidirectional streams) continues to function normally.
Notes
This function corresponds to the QUIC RESET_STREAM frame.
Return values
Returns 1 on success and 0 on failure.
This function fails if called on a QUIC connection SSL object without a default stream attached, or on a non-QUIC SSL object.
After the first call to this function succeeds for a given stream, subsequent calls succeed but are ignored. The application error code used is that passed to the first successful call to this function.
Releases
2 releases since Debian 13 (Trixie); the text changed 1 time.