Lines Matching +refs:write +refs:if +refs:changed

18 L<ossl-guide-tls-client-block(7)> page which demonstrates how to write a simple
28 until data is available to read if you attempt to read from it when there is no
29 data yet. Similarly it waits when writing if the socket is currently unable to
30 write at the moment. This can simplify the development of code because you do
34 to go and do other tasks whilst the socket is unable to read/write, for example
37 With a nonblocking socket attempting to read or write to a socket that is
38 currently unable to read or write will return immediately with a non-fatal
55 if (!BIO_socket_nbio(sock, 1)) {
67 we want to read or write to the socket, but we are currently unable to. In fact
71 operation that it previously attempted periodically to see if it can now
73 underlying socket has actually changed (e.g. become readable where it wasn't
77 tried last time. You cannot start something new. For example if you were
78 attempting to write the text "Hello World" and the operation failed because the
79 socket is currently unable to write, then you cannot then attempt to write
89 static void wait_for_activity(SSL *ssl, int write)
114 * you check if it did so because of activity on the file descriptors or
118 if (write)
148 B<SSL_ERROR_WANT_WRITE> depending on whether OpenSSL wanted to read to or write
151 may need to write protocol messages (such as to update cryptographic keys) even
152 if the application is only trying to read data. Similarly calls to
156 indicates an EOF (End-Of-File) which can occur if you attempt to read data from
158 on it. In this case you may still want to write data to the connection but you
169 In our demo application we will write a function to handle these errors from
181 /* Temporary failure. Wait until we can write and try again */
197 if (SSL_get_verify_result(ssl) != X509_V_OK)
212 (except EOF), 0 in the event of EOF, or -1 if a fatal error occurred.
232 if (handle_io_failure(ssl, ret) == 1)
250 write with the same length. You must not attempt to send different data on a
256 blocking tutorial (L<ossl-guide-tls-client-block(7)>) we write the request
261 if (handle_io_failure(ssl, 0) == 1)
263 printf("Failed to write start of HTTP request\n");
267 if (handle_io_failure(ssl, 0) == 1)
269 printf("Failed to write hostname in HTTP request\n");
273 if (handle_io_failure(ssl, 0) == 1)
275 printf("Failed to write end of HTTP request\n");
279 On a write we do not expect to see an EOF response so we treat that case in the
304 * that it is NUL terminated so we use fwrite() to write the exact
309 if (!eof)
344 if (ret < 0 && handle_io_failure(ssl, ret) == 1)
364 See L<ossl-guide-tls-client-block(7)> to read a tutorial on how to write a