;Failed to connect to server\n&quot;);
    goto end; /* Cannot retry: error */
}</code></pre>

<p>We continually call <a href="../man3/SSL_connect.html">SSL_connect(3)</a> until it gives us a success response. Otherwise we use the <code>handle_io_failure()</code> function that we created earlier to work out what we should do next. Note that we do not expect an EOF to occur at this stage, so such a response is treated in the same way as a fatal error.</p>

<h2 id="Sending-and-receiving-data">Sending and rece