Debian Codegraph @

upstream/debian-unstable/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.6.2 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 SSL_ACCEPT_STREAM_UNI, SSL_ACCEPT_STREAM_BIDI \-
66 accept an incoming QUIC stream from a QUIC peer
67 .SH SYNOPSIS
68 .IX Header "SYNOPSIS"
69 .Vb 1
70 \& #include <openssl/ssl.h>
71 \&
72 \& #define SSL_ACCEPT_STREAM_NO_BLOCK
73 \& #define SSL_ACCEPT_STREAM_UNI
74 \& #define SSL_ACCEPT_STREAM_BIDI
75 \&
76 \& SSL *SSL_accept_stream(SSL *ssl, uint64_t flags);
77 \&
78 \& size_t SSL_get_accept_stream_queue_len(SSL *ssl);
79 .Ve
80 .SH DESCRIPTION
81 .IX Header "DESCRIPTION"
82 The \fBSSL_accept_stream()\fR function attempts to dequeue an incoming stream from the
83 given QUIC connection SSL object and returns the newly allocated QUIC stream SSL
84 object.
85 .PP
86 If the queue of incoming streams is empty, this function returns NULL (in
87 nonblocking mode) or waits for an incoming stream (in blocking mode). This
88 function may still return NULL in blocking mode, for example if the underlying
89 connection is terminated.
90 .PP
91 The caller is responsible for managing the lifetime of the returned QUIC stream
92 SSL object; for more information, see \fBSSL_free\fR\|(3).
93 .PP
94 This function will block if the QUIC connection SSL object is configured in
95 blocking mode (see \fBSSL_set_blocking_mode\fR\|(3)), but this may be bypassed by
96 passing the flag \fBSSL_ACCEPT_STREAM_NO_BLOCK\fR in \fIflags\fR. If this flag is set,
97 this function never blocks.
98 .PP
99 By default, this function will return the first incoming stream, whether it is
100 unidirectional or bidirectional. Passing the flag \fBSSL_ACCEPT_STREAM_UNI\fR or
101 \&\fBSSL_ACCEPT_STREAM_BIDI\fR will return the first stream that is unidirectional or
102 bidirectional, respectively. If these flags are both set, either type can be
103 returned. A NULL return value may mean that there are still streams that can
104 be dequeued.
105 .PP
106 Calling \fBSSL_accept_stream()\fR if there is no default stream already present
107 inhibits the future creation of a default stream. See \fBopenssl\-quic\fR\|(7).
108 .PP
109 \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams
110 currently waiting in the accept queue.
111 .PP
112 These functions can be used from multiple threads for the same QUIC connection.
113 .PP
114 Depending on whether default stream functionality is being used, it may be
115 necessary to explicitly configure the incoming stream policy before streams can
116 be accepted; see \fBSSL_set_incoming_stream_policy\fR\|(3). See also
117 "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7) for more information on default stream
118 functionality.
119 .SH "RETURN VALUES"
120 .IX Header "RETURN VALUES"
121 \&\fBSSL_accept_stream()\fR returns a newly allocated QUIC stream SSL object, or NULL if
122 no new incoming streams are available, or if the connection has been terminated,
123 or if called on an SSL object other than a QUIC connection SSL object.
124 \&\fBSSL_get_error\fR\|(3) can be used to obtain further information in this case.
125 .PP
126 \&\fBSSL_get_accept_stream_queue_len()\fR returns the number of incoming streams
127 currently waiting in the accept queue, or 0 if called on an SSL object other than
128 a QUIC connection SSL object.
129 .SH "SEE ALSO"
130 .IX Header "SEE ALSO"
131 "MODES OF OPERATION" in \fBopenssl\-quic\fR\|(7), \fBSSL_new_stream\fR\|(3),
132 \&\fBSSL_set_blocking_mode\fR\|(3), \fBSSL_free\fR\|(3)
133 .SH HISTORY
134 .IX Header "HISTORY"
135 \&\fBSSL_accept_stream()\fR and \fBSSL_get_accept_stream_queue_len()\fR were added in OpenSSL
136 3.2.
137 .SH COPYRIGHT
138 .IX Header "COPYRIGHT"
139 Copyright 2002\-2025 The OpenSSL Project Authors. All Rights Reserved.
140 .PP
141 Licensed under the Apache License 2.0 (the "License"). You may not use
142 this file except in compliance with the License. You can obtain a copy
143 in the file LICENSE in the source distribution or at
144 <https://www.openssl.org/source/license.html>.