.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SSL_ACCEPT_STREAM 3ssl" .TH SSL_ACCEPT_STREAM 3ssl 2024-04-28 3.3.0 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME SSL_accept_stream, SSL_get_accept_stream_queue_len, SSL_ACCEPT_STREAM_NO_BLOCK \- accept an incoming QUIC stream from a QUIC peer .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& #define SSL_ACCEPT_STREAM_NO_BLOCK \& \& SSL *SSL_accept_stream(SSL *ssl, uint64_t flags); \& \& size_t SSL_get_accept_stream_queue_len(SSL *ssl); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBSSL_accept_stream()\fR function attempts to dequeue an incoming stream from the given QUIC connection SSL object and returns the newly allocated QUIC stream SSL object. .PP If the queue of incoming streams is empty, this function returns NULL (in nonblocking mode) or waits for an incoming stream (in blocking mode). This function may still return NULL in blocking mode, for example if the underlying connection is terminated. .PP The caller is responsible for managing the lifetime of the returned QUIC stream SSL object; for more information, see \fBSSL_free\fR\|(3). .PP This function will block if the QUIC connection SSL object is configured in blocking mode (see \fBSSL_set_blocking_mode\fR\|(3)), but this may be bypassed by passing the flag \fBSSL_ACCEPT_STREAM_NO_BLOCK\fR in \fIflags\fR. If this flag is set, this function never blocks. .PP Calling \fBSSL_accept_stream()\fR if there is no default stream already present inhibits the future creation of a default stream. See \fBopenssl\-quic\fR\|(7). .PP \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams currently waiting in the accept queue. .PP These functions can be used from multiple threads for the same QUIC connection. .PP Depending on whether default stream functionality is being used, it may be necessary to explicitly configure the incoming stream policy before streams can be accepted; see \fBSSL_set_incoming_stream_policy\fR\|(3). See also "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7) for more information on default stream functionality. .SH "RETURN VALUES" .IX Header "RETURN VALUES" \&\fBSSL_accept_stream()\fR returns a newly allocated QUIC stream SSL object, or NULL if no new incoming streams are available, or if the connection has been terminated, or if called on a SSL object other than a QUIC connection SSL object. \&\fBSSL_get_error\fR\|(3) can be used to obtain further information in this case. .PP \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams currently waiting in the accept queue, or 0 if called on a SSL object other than a QUIC connection SSL object. .SH "SEE ALSO" .IX Header "SEE ALSO" "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7), \fBSSL_new_stream\fR\|(3), \&\fBSSL_set_blocking_mode\fR\|(3), \fBSSL_free\fR\|(3) .SH HISTORY .IX Header "HISTORY" \&\fBSSL_accept_stream()\fR and \fBSSL_get_accept_stream_queue_len()\fR were added in OpenSSL 3.2. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2002\-2023 The OpenSSL Project Authors. All Rights Reserved. .PP 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 .