Lines Matching +full:way +full:- +full:select

1 .\" -*- mode: troff; coding: utf-8 -*-
57 .IX Title "OSSL-GUIDE-TLS-CLIENT-NON-BLOCK 7ossl"
58 .TH OSSL-GUIDE-TLS-CLIENT-NON-BLOCK 7ossl 2025-09-30 3.5.4 OpenSSL
60 .\" way too many mistakes in technical documents.
64 ossl\-guide\-tls\-client\-non\-block
65 \&\- OpenSSL Guide: Writing a simple nonblocking TLS client
69 \&\fBossl\-guide\-tls\-client\-block\fR\|(7) page which demonstrates how to write a simple
75 \&\fBtls\-client\-non\-block.c\fR. It is also available online at
76 <https://github.com/openssl/openssl/blob/master/demos/guide/tls\-client\-non\-block.c>.
89 currently unable to read or write will return immediately with a non-fatal
95 \&\fBossl\-guide\-tls\-client\-block\fR\|(7) page we assume that you are familiar with it
107 \& sock = \-1;
154 \& * Wait until the socket is writeable or readable. We use select here
164 \& * a GUI every 100ms. One way to do that would be to add a 100ms timeout
165 \& * in the last parameter to "select" below. Then, when select returns,
168 \& * GUI and then restart the "select".
171 \& select(width, NULL, &fds, NULL, NULL);
173 \& select(width, &fds, NULL, NULL, NULL);
177 In this example we are using the \f(CW\*(C`select\*(C'\fR function because it is very simple
179 other similar function to do the same thing. \f(CW\*(C`select\*(C'\fR waits for the state of
190 connection has failed), or non-fatal (for example because we are trying to read
198 out what type of error has occurred. If the error is non-fatal and can be
207 Another type of non-fatal error that may occur is \fBSSL_ERROR_ZERO_RETURN\fR. This
208 indicates an EOF (End-Of-File) which can occur if you attempt to read data from
243 \& return \-1;
253 \& return \-1;
256 \& 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.
271 on the \fBossl\-guide\-tls\-client\-block\fR\|(7) page. We won't repeat that information
277 socket it is very likely that calls to this function will fail with a non-fatal
295 this stage, so such a response is treated in the same way as a fatal error.
300 a nonblocking socket, this call could fail with a non-fatal error. In that case
307 same data \- even though the buffer that contains that data may change location.
309 blocking tutorial (\fBossl\-guide\-tls\-client\-block\fR\|(7)) we write the request
335 same way as a fatal error.
352 \& case \-1:
361 \& * number of bytes that we read. The data could be non\-printable or
420 See \fBossl\-guide\-tls\-client\-block\fR\|(7) to read a tutorial on how to write a
421 blocking TLS client. See \fBossl\-guide\-quic\-client\-block\fR\|(7) to see how to do the
425 \&\fBossl\-guide\-introduction\fR\|(7), \fBossl\-guide\-libraries\-introduction\fR\|(7),
426 \&\fBossl\-guide\-libssl\-introduction\fR\|(7), \fBossl\-guide\-tls\-introduction\fR\|(7),
427 \&\fBossl\-guide\-tls\-client\-block\fR\|(7), \fBossl\-guide\-quic\-client\-block\fR\|(7)