]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/BIO_socket_wait.pod
Introduce the provider property
[thirdparty/openssl.git] / doc / man3 / BIO_socket_wait.pod
CommitLineData
bcbb30af
DDO
1=pod
2
3=head1 NAME
4
5BIO_socket_wait,
6BIO_wait,
7BIO_connect_retry
8- BIO socket utility functions
9
10=head1 SYNOPSIS
11
12 #include <openssl/bio.h>
13
14 int BIO_socket_wait(int fd, int for_read, time_t max_time);
15 int BIO_wait(BIO *bio, time_t max_time);
16 int BIO_connect_retry(BIO *bio, long timeout);
17
18=head1 DESCRIPTION
19
20BIO_socket_wait() waits on the socket B<fd> for reading if B<for_read> is not 0,
21else for writing, at most until B<max_time>.
22It succeeds immediately if B<max_time> == 0 (which means no timeout given).
23
24BIO_wait() waits on the socket underlying the given B<bio>, for reading if
25B<bio> is supposed to read, else for writing, at most until B<max_time>.
26It succeeds immediately if B<max_time> == 0 (which means no timeout given).
27
28BIO_connect_retry() connects via the given B<bio>, retrying BIO_do_connect()
29until success or a timeout or error condition is reached.
30If the B<timeout> parameter is > 0 this indicates the maximum number of seconds
31to wait until the connection is established. A value of 0 enables waiting
32indefinitely, while a value < 0 immediately leads to a timeout condition.
33
34=head1 RETURN VALUES
35
36BIO_socket_wait(), BIO_wait(), and BIO_connect_retry()
37return -1 on error, 0 on timeout, and 1 on success.
38
39=head1 HISTORY
40
41BIO_socket_wait(), BIO_wait(), and BIO_connect_retry()
42were added in OpenSSL 3.0.
43
44=head1 COPYRIGHT
45
46Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
47
48Licensed under the Apache License 2.0 (the "License"). You may not use
49this file except in compliance with the License. You can obtain a copy
50in the file LICENSE in the source distribution or at
51L<https://www.openssl.org/source/license.html>.
52
53=cut