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

17 This page presents various source code samples demonstrating how to write a
33 we use select() to make the listening socket block when it cannot read/write.
35 tasks whilst the B<SSL> object is unable to read/write. For example: updating a
46 and that you know how to write and build C code and link it against the
63 if (ctx == NULL)
87 if (SSL_CTX_use_certificate_chain_file(ctx, cert_path) <= 0) {
99 if (SSL_CTX_use_PrivateKey_file(ctx, key_path, SSL_FILETYPE_PEM) <= 0) {
106 when the client does not present a certificate. Note: Even if a client did
158 if (SSL_select_next_proto((unsigned char **)out, out_len, alpn_ossltest,
169 if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
178 if (bind(fd, (const struct sockaddr *)&sa, sizeof(sa)) < 0) {
185 if (BIO_socket_nbio(fd, 1) <= 0) {
196 if ((listener = SSL_new_listener(ctx, 0)) == NULL)
200 if (!SSL_set_fd(listener, fd))
206 if (!SSL_set_blocking_mode(listener, 0))
211 * will implicitly start listening. It is only needed if a server wishes to
215 if (!SSL_listen(listener))
251 * Determine if we would like to write to the socket, read from it, or both.
253 if (SSL_net_write_desired(ssl))
255 if (SSL_net_read_desired(ssl))
260 * whether the state of the underlying socket has changed or not.
262 if (SSL_get_event_timeout(ssl, &tv, &isinfinite) && !isinfinite)
279 * check if it did so because of activity on the file descriptors or
294 if (total_read >= 8192) {
303 if (!SSL_has_pending(conn))
314 send a FIN packet once the write has successfully finished writing all the data
321 if (handle_io_failure(conn, 0) == 1)
323 fprintf(stderr, "Failed to write data\n");
335 if (ret < 0 && handle_io_failure(conn, ret) == 1)