ares_timeout.3 (1219B)
1 .\" 2 .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 .\" SPDX-License-Identifier: MIT 4 .\" 5 .TH ARES_TIMEOUT 3 "25 July 1998" 6 .SH NAME 7 ares_timeout \- return maximum time to wait 8 .SH SYNOPSIS 9 .nf 10 #include <ares.h> 11 12 struct timeval *ares_timeout(const ares_channel_t *\fIchannel\fP, 13 struct timeval *\fImaxtv\fP, 14 struct timeval *\fItv\fP) 15 .fi 16 .SH DESCRIPTION 17 The \fBares_timeout(3)\fP function determines the maximum time for which the 18 caller should wait before invoking \fIares_process(3)\fP to process timeouts. 19 The parameter \fImaxtv\fP specifies a existing maximum timeout, or \fBNULL\fP 20 if the caller does not wish to apply a maximum timeout. The parameter 21 \fItv\fP must point to a writable buffer of type \fBstruct timeval\fP It is 22 valid for \fImaxtv\fP and \fItv\fP to have the same value. 23 24 If no queries have timeouts pending sooner than the given maximum timeout, 25 \fBares_timeout(3)\fP returns the value of \fImaxtv\fP; otherwise 26 \fBares_timeout(3)\fP stores the appropriate timeout value into the buffer 27 pointed to by \fItv\fP and returns the value of \fItv\fP. 28 .SH SEE ALSO 29 .BR ares_fds (3), 30 .BR ares_process (3), 31 .BR ares_process_fd (3)