1=pod 2 3=head1 NAME 4 5SSL_stream_reset - reset a QUIC stream 6 7=head1 SYNOPSIS 8 9 #include <openssl/ssl.h> 10 11 typedef struct ssl_stream_reset_args_st { 12 uint64_t quic_error_code; 13 } SSL_STREAM_RESET_ARGS; 14 15 int SSL_stream_reset(SSL *ssl, 16 const SSL_STREAM_RESET_ARGS *args, 17 size_t args_len); 18 19=head1 DESCRIPTION 20 21The SSL_stream_reset() function resets the send part of a QUIC stream when 22called on a QUIC stream SSL object, or on a QUIC connection SSL object with a 23default stream attached. 24 25If I<args> is non-NULL, I<args_len> must be set to C<sizeof(*args)>. 26 27I<quic_error_code> is an application-specified error code, which must be in the 28range [0, 2**62-1]. If I<args> is NULL, a value of 0 is used. 29 30Resetting a stream indicates to an application that the sending part of the 31stream is terminating abnormally. When a stream is reset, the implementation 32does not guarantee that any data already passed to L<SSL_write(3)> will be 33received by the peer, and data already passed to L<SSL_write(3)> but not yet 34transmitted may or may not be discarded. As such, you should only reset 35a stream when the information transmitted on the stream no longer matters, for 36example due to an error condition. 37 38This function cannot be called on a unidirectional stream initiated by the peer, 39as only the sending side of a stream can initiate a stream reset. 40 41It is also possible to trigger a stream reset by calling L<SSL_free(3)>; see the 42documentation for L<SSL_free(3)> for details. 43 44The receiving part of the stream (for bidirectional streams) continues to 45function normally. 46 47=head1 NOTES 48 49This function corresponds to the QUIC B<RESET_STREAM> frame. 50 51=head1 RETURN VALUES 52 53Returns 1 on success and 0 on failure. 54 55This function fails if called on a QUIC connection SSL object without a default 56stream attached, or on a non-QUIC SSL object. 57 58After the first call to this function succeeds for a given stream, 59subsequent calls succeed but are ignored. The application error code 60used is that passed to the first successful call to this function. 61 62=head1 SEE ALSO 63 64L<SSL_free(3)> 65 66=head1 HISTORY 67 68SSL_stream_reset() was added in OpenSSL 3.2. 69 70=head1 COPYRIGHT 71 72Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved. 73 74Licensed under the Apache License 2.0 (the "License"). You may not use 75this file except in compliance with the License. You can obtain a copy 76in the file LICENSE in the source distribution or at 77L<https://www.openssl.org/source/license.html>. 78 79=cut 80