[#BIO_wait]
= BIO&lowbar;wait
:mrdocs:

Wait until a BIO is ready for I&sol;O or until `max&lowbar;time` elapses&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BIO&lowbar;wait(
    xref:BIO.adoc[BIO]* bio,
    time&lowbar;t max&lowbar;time,
    unsigned int nap&lowbar;milliseconds);
----

== Return Value

1 when ready, 0 on timeout, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bio*
| BIO to poll (typically a socket or non&hyphen;blocking I&sol;O BIO)&period;
| *max&lowbar;time*
| Absolute deadline as a time&lowbar;t (0 means wait indefinitely where supported)&period;
| *nap&lowbar;milliseconds*
| Sleep quantum between polls when the BIO has no native wait&period;
|===


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