summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man3/SSL_accept_stream.3ssl
blob: 494bc439c5e6012c09f44956dae0ed2d63a547b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.\" -*- 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-04 3.2.2-dev 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 <openssl/ssl.h>
\&
\& #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
<https://www.openssl.org/source/license.html>.