Lines Matching +full:retry +full:- +full:time
6 demos/guide/quic-client-non-block.c
12 ossl-guide-quic-client-non-block
13 - OpenSSL Guide: Writing a simple nonblocking QUIC client
18 L<ossl-guide-quic-client-block(7)> page which demonstrates how to write a simple
24 B<quic-client-non-block.c>. It is also available online at
25 L<https://github.com/openssl/openssl/blob/master/demos/guide/quic-client-non-block.c>.
42 L<SSL_read_ex(3)> or L<SSL_write_ex(3)> will return immediately with a non-fatal
46 L<ossl-guide-quic-client-block(7)> page we assume that you are familiar with it
55 the application has to do, it must also be prepared to come back and retry the
58 such that it might succeed on the retry attempt, but this does not have to be
59 the case. It can retry at any time.
61 Note that it is important that you retry exactly the same operation that you
62 tried last time. You cannot start something new. For example if you were
65 write some other text when you retry the operation.
127 TLS (see L<ossl-guide-tls-client-non-block(7)>) then you should note that there
130 to the B<SSL> object and we get a "retry" response (B<SSL_ERROR_WANT_READ> or
132 read or write to the underlying socket and the socket signalled the "retry".
133 With QUIC that is not the case. OpenSSL may signal retry as a result of an
136 socket needs to retry or not.
147 function can be used to determine what the deadline is for the next time we need
171 has failed), or non-fatal (for example because we are trying to read from the
179 out what type of error has occurred. If the error is non-fatal and can be
186 Another type of non-fatal error that may occur is B<SSL_ERROR_ZERO_RETURN>. This
187 indicates an EOF (End-Of-File) which can occur if you attempt to read data from
221 return -1;
226 * stream reset - or some failure occurred on the underlying
254 return -1;
257 return -1;
263 the event of a non-fatal failure, it waits until a retry of the I/O operation
265 in the previous section). It returns 1 in the event of a non-fatal error
266 (except EOF), 0 in the event of EOF, or -1 if a fatal error occurred.
272 explained on the L<ossl-guide-quic-client-block(7)> page. We won't repeat that
297 object idle for some time when using nonblocking mode. By using "thread assisted
314 non-fatal error while we are waiting for the server to respond to our handshake
315 messages. In such a case we must retry the same L<SSL_connect(3)> call at a
316 later time. In this demo we do this in a loop:
321 continue; /* Retry */
323 goto end; /* Cannot retry: error */
335 a nonblocking B<SSL> object, this call could fail with a non-fatal error. In
336 that case we should retry exactly the same L<SSL_write_ex(3)> call again. Note
339 data on a retry. An optional mode does exist
341 the buffer being written to change from one retry to the next. However, in this
342 case, you must still retry exactly the same data - even though the buffer that
344 details. As in the TLS tutorials (L<ossl-guide-tls-client-block(7)>) we write
356 continue; /* Retry */
358 goto end; /* Cannot retry: error */
362 continue; /* Retry */
364 goto end; /* Cannot retry: error */
369 continue; /* Retry */
371 goto end; /* Cannot retry: error */
387 continue; /* Retry */
391 case -1:
394 goto end; /* Cannot retry: error */
400 * number of bytes that we read. The data could be non-printable or
410 The main difference this time is that it is valid for us to receive an EOF
432 have to retry this operation several times. If L<SSL_shutdown(3)> returns a
443 continue; /* Retry */
454 See L<ossl-guide-quic-client-block(7)> to read a tutorial on how to write a
455 blocking QUIC client. See L<ossl-guide-quic-multi-stream(7)> to see how to write
456 a multi-stream QUIC client.
460 L<ossl-guide-introduction(7)>, L<ossl-guide-libraries-introduction(7)>,
461 L<ossl-guide-libssl-introduction(7)>, L<ossl-guide-quic-introduction(7)>,
462 L<ossl-guide-quic-client-block(7)>, L<ossl-guide-quic-multi-stream(7)>
466 Copyright 2023-2025 The OpenSSL Project Authors. All Rights Reserved.