Debian Codegraph @

upstream/debian-trixie/man3/SSL_accept_stream.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "SSL_ACCEPT_STREAM 3SSL"
58 .TH SSL_ACCEPT_STREAM 3SSL 2026-04-07 3.5.6 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 SSL_accept_stream, SSL_get_accept_stream_queue_len, SSL_ACCEPT_STREAM_NO_BLOCK \-
65 accept an incoming QUIC stream from a QUIC peer
66 .SH SYNOPSIS
67 .IX Header "SYNOPSIS"
68 .Vb 1
69 \& #include <openssl/ssl.h>
70 \&
71 \& #define SSL_ACCEPT_STREAM_NO_BLOCK
72 \&
73 \& SSL *SSL_accept_stream(SSL *ssl, uint64_t flags);
74 \&
75 \& size_t SSL_get_accept_stream_queue_len(SSL *ssl);
76 .Ve
77 .SH DESCRIPTION
78 .IX Header "DESCRIPTION"
79 The \fBSSL_accept_stream()\fR function attempts to dequeue an incoming stream from the
80 given QUIC connection SSL object and returns the newly allocated QUIC stream SSL
81 object.
82 .PP
83 If the queue of incoming streams is empty, this function returns NULL (in
84 nonblocking mode) or waits for an incoming stream (in blocking mode). This
85 function may still return NULL in blocking mode, for example if the underlying
86 connection is terminated.
87 .PP
88 The caller is responsible for managing the lifetime of the returned QUIC stream
89 SSL object; for more information, see \fBSSL_free\fR\|(3).
90 .PP
91 This function will block if the QUIC connection SSL object is configured in
92 blocking mode (see \fBSSL_set_blocking_mode\fR\|(3)), but this may be bypassed by
93 passing the flag \fBSSL_ACCEPT_STREAM_NO_BLOCK\fR in \fIflags\fR. If this flag is set,
94 this function never blocks.
95 .PP
96 Calling \fBSSL_accept_stream()\fR if there is no default stream already present
97 inhibits the future creation of a default stream. See \fBopenssl\-quic\fR\|(7).
98 .PP
99 \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams
100 currently waiting in the accept queue.
101 .PP
102 These functions can be used from multiple threads for the same QUIC connection.
103 .PP
104 Depending on whether default stream functionality is being used, it may be
105 necessary to explicitly configure the incoming stream policy before streams can
106 be accepted; see \fBSSL_set_incoming_stream_policy\fR\|(3). See also
107 "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7) for more information on default stream
108 functionality.
109 .SH "RETURN VALUES"
110 .IX Header "RETURN VALUES"
111 \&\fBSSL_accept_stream()\fR returns a newly allocated QUIC stream SSL object, or NULL if
112 no new incoming streams are available, or if the connection has been terminated,
113 or if called on an SSL object other than a QUIC connection SSL object.
114 \&\fBSSL_get_error\fR\|(3) can be used to obtain further information in this case.
115 .PP
116 \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams
117 currently waiting in the accept queue, or 0 if called on an SSL object other than
118 a QUIC connection SSL object.
119 .SH "SEE ALSO"
120 .IX Header "SEE ALSO"
121 "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7), \fBSSL_new_stream\fR\|(3),
122 \&\fBSSL_set_blocking_mode\fR\|(3), \fBSSL_free\fR\|(3)
123 .SH HISTORY
124 .IX Header "HISTORY"
125 \&\fBSSL_accept_stream()\fR and \fBSSL_get_accept_stream_queue_len()\fR were added in OpenSSL
126 3.2.
127 .SH COPYRIGHT
128 .IX Header "COPYRIGHT"
129 Copyright 2002\-2023 The OpenSSL Project Authors. All Rights Reserved.
130 .PP
131 Licensed under the Apache License 2.0 (the "License"). You may not use
132 this file except in compliance with the License. You can obtain a copy
133 in the file LICENSE in the source distribution or at
134 <https://www.openssl.org/source/license.html>.