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

Name

Description

fd

Socket file descriptor to poll.

for_read

Non‐zero to wait for readability; zero to wait for writability.

max_time

Absolute deadline as a time_t; 0 means no timeout (succeed immediately).

Created with MrDocs