[#BIO_do_connect_retry]
= BIO&lowbar;do&lowbar;connect&lowbar;retry
:mrdocs:

Drive BIO&lowbar;do&lowbar;connect() with retries until connected, failed, or `timeout` elapses&period;

== Synopsis

Declared in `&lt;openssl&sol;bio&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BIO&lowbar;do&lowbar;connect&lowbar;retry(
    xref:BIO.adoc[BIO]* bio,
    int timeout,
    int nap&lowbar;milliseconds);
----

== Return Value

1 when connected, &lt;&equals;0 on failure or expiry (see BIO&lowbar;should&lowbar;retry())&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bio*
| Connect BIO to advance&period;
| *timeout*
| Overall timeout in seconds&semi; 0 waits forever&semi; &lt;0 tries once without sleeping&period;
| *nap&lowbar;milliseconds*
| Sleep between non&hyphen;blocking retries (or &lt;&equals;0 for a default nap)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
