BIO_socket_wait

Wait on a socket until it is ready for I/O or until max_time elapses.

Synopsis

Declared in <openssl/bio.h>

int
BIO_socket_wait(
    int fd,
    int for_read,
    time_t max_time);

Return Value

1 on success, 0 on timeout, or -1 on error.

Parameters

NameDescription
fdSocket file descriptor to poll.
for_readNon-zero to wait for readability; zero to wait for writability.
max_timeAbsolute deadline as a time_t; 0 means no timeout (succeed immediately).