![]() |
![]()
| ![]() |
![]()
NAMESSL_get_stream_read_state, SSL_get_stream_write_state, SSL_get_stream_read_error_code, SSL_get_stream_write_error_code, SSL_STREAM_STATE_NONE, SSL_STREAM_STATE_OK, SSL_STREAM_STATE_WRONG_DIR, SSL_STREAM_STATE_FINISHED, SSL_STREAM_STATE_RESET_LOCAL, SSL_STREAM_STATE_RESET_REMOTE, SSL_STREAM_STATE_CONN_CLOSED - get QUIC stream state SYNOPSIS#include <openssl/ssl.h> #define SSL_STREAM_STATE_NONE #define SSL_STREAM_STATE_OK #define SSL_STREAM_STATE_WRONG_DIR #define SSL_STREAM_STATE_FINISHED #define SSL_STREAM_STATE_RESET_LOCAL #define SSL_STREAM_STATE_RESET_REMOTE #define SSL_STREAM_STATE_CONN_CLOSED int SSL_get_stream_read_state(SSL *ssl); int SSL_get_stream_write_state(SSL *ssl); int SSL_get_stream_read_error_code(SSL *ssl, uint64_t *app_error_code); int SSL_get_stream_write_error_code(SSL *ssl, uint64_t *app_error_code); DESCRIPTIONSSL_get_stream_read_state() and SSL_get_stream_write_state() retrieve the overall state of the receiving and sending parts of a QUIC stream, respectively. They both return one of the following values:
SSL_get_stream_read_error_code() and SSL_get_stream_write_error_code() provide the application error code which was signalled during non-normal termination of the receiving or sending parts of a stream, respectively. On success, the application error code is written to *app_error_code. NOTESIf a QUIC connection is closed, the stream state for all streams transitions to SSL_STREAM_STATE_CONN_CLOSED, but no application error code can be retrieved using SSL_get_stream_read_error_code() or SSL_get_stream_write_error_code(), as the QUIC connection closure process does not cause an application error code to be associated with each individual stream still existing at the time of connection closure. However, you can obtain the overall error code associated with the connection closure using SSL_get_conn_close_info(3). RETURN VALUESSSL_get_stream_read_state() and SSL_get_stream_write_state() return one of the SSL_STREAM_STATE values. If called on a non-QUIC SSL object, or a QUIC connection SSL object without a default stream, SSL_STREAM_STATE_NONE is returned. SSL_get_stream_read_error_code() and SSL_get_stream_write_error_code() return 1 on success and 0 if the stream was terminated normally. They return -1 on error, for example if the stream is still healthy, was still healthy at the time of connection closure, if called on a stream for which the respective stream part does not exist (e.g. on a unidirectional stream), or if called on a non-QUIC object or a QUIC connection SSL object without a default stream attached. SEE ALSOSSL_stream_conclude(3), SSL_stream_reset(3), SSL_new_stream(3), SSL_accept_stream(3), SSL_get_conn_close_info(3) HISTORYThese functions were added in OpenSSL 3.2. COPYRIGHTCopyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
|