As in the TLS tutorials (<a href="../man7/ossl-guide-tls-client-block.html">ossl-guide-tls-client-block(7)</a>) we write the request in three chunks.</p>

<pre><code>/* Write an HTTP GET request to the peer */
while (!SSL_write_ex(ssl, request_start, strlen(request_start), &amp;written)) {
    if (handle_io_failure(ssl, 0) == 1)
        continue; /* Retry */
    printf(&quot;Failed to write start of HTTP request\n&quot;);
    goto end; /* Cannot retry: error */
}
while (!SSL_write_ex(ssl, hostname, strlen(h