Lines Matching +full:multi +full:- +full:socket
1 .\" -*- mode: troff; coding: utf-8 -*-
57 .IX Title "OSSL-GUIDE-QUIC-CLIENT-NON-BLOCK 7ossl"
58 .TH OSSL-GUIDE-QUIC-CLIENT-NON-BLOCK 7ossl 2025-09-30 3.5.4 OpenSSL
64 ossl\-guide\-quic\-client\-non\-block
65 \&\- OpenSSL Guide: Writing a simple nonblocking QUIC client
69 \&\fBossl\-guide\-quic\-client\-block\fR\|(7) page which demonstrates how to write a simple
75 \&\fBquic\-client\-non\-block.c\fR. It is also available online at
76 <https://github.com/openssl/openssl/blob/master/demos/guide/quic\-client\-non\-block.c>.
79 nonblocking socket. However, despite this, the \fBSSL\fR object still has blocking
93 \&\fBSSL_read_ex\fR\|(3) or \fBSSL_write_ex\fR\|(3) will return immediately with a non-fatal
97 \&\fBossl\-guide\-quic\-client\-block\fR\|(7) page we assume that you are familiar with it
99 .SS "Performing work while waiting for the socket"
100 .IX Subsection "Performing work while waiting for the socket"
119 for the state of the underlying socket to change or until a timeout expires
131 \& /* Get hold of the underlying file descriptor for the socket */
138 \& * Find out if we would like to write to the socket, or read from it (or
149 \& * whether the state of the underlying socket has changed or not.
155 \& * Wait until the socket is writeable or readable. We use select here
179 TLS (see \fBossl\-guide\-tls\-client\-non\-block\fR\|(7)) then you should note that there
184 read or write to the underlying socket and the socket signalled the "retry".
188 socket needs to retry or not.
191 socket for a QUIC application we must call the \fBSSL_net_read_desired\fR\|(3) and
211 readability/writeability of the socket because it is very simple to use and is
214 socket(s) to become readable/writeable or until the timeout has expired before
222 has failed), or non-fatal (for example because we are trying to read from the
230 out what type of error has occurred. If the error is non-fatal and can be
237 Another type of non-fatal error that may occur is \fBSSL_ERROR_ZERO_RETURN\fR. This
238 indicates an EOF (End-Of-File) which can occur if you attempt to read data from
273 \& return \-1;
278 \& * stream reset \- or some failure occurred on the underlying
306 \& return \-1;
309 \& return \-1;
316 the event of a non-fatal failure, it waits until a retry of the I/O operation
318 in the previous section). It returns 1 in the event of a non-fatal error
319 (except EOF), 0 in the event of EOF, or \-1 if a fatal error occurred.
324 explained on the \fBossl\-guide\-quic\-client\-block\fR\|(7) page. We won't repeat that
333 \& * The underlying socket is always nonblocking with QUIC, but the default
348 state. See "Performing work while waiting for the socket" for more discussion
369 non-fatal error while we are waiting for the server to respond to our handshake
391 a nonblocking \fBSSL\fR object, this call could fail with a non-fatal error. In
398 case, you must still retry exactly the same data \- even though the buffer that
400 details. As in the TLS tutorials (\fBossl\-guide\-tls\-client\-block\fR\|(7)) we write
450 \& case \-1:
459 \& * number of bytes that we read. The data could be non\-printable or
513 See \fBossl\-guide\-quic\-client\-block\fR\|(7) to read a tutorial on how to write a
514 blocking QUIC client. See \fBossl\-guide\-quic\-multi\-stream\fR\|(7) to see how to write
515 a multi-stream QUIC client.
518 \&\fBossl\-guide\-introduction\fR\|(7), \fBossl\-guide\-libraries\-introduction\fR\|(7),
519 \&\fBossl\-guide\-libssl\-introduction\fR\|(7), \fBossl\-guide\-quic\-introduction\fR\|(7),
520 \&\fBossl\-guide\-quic\-client\-block\fR\|(7), \fBossl\-guide\-quic\-multi\-stream\fR\|(7)
523 Copyright 2023\-2025 The OpenSSL Project Authors. All Rights Reserved.