jpayne@68: .\" jpayne@68: .\" Copyright 1998 by the Massachusetts Institute of Technology. jpayne@68: .\" SPDX-License-Identifier: MIT jpayne@68: .\" jpayne@68: .TH ARES_TIMEOUT 3 "25 July 1998" jpayne@68: .SH NAME jpayne@68: ares_timeout \- return maximum time to wait jpayne@68: .SH SYNOPSIS jpayne@68: .nf jpayne@68: #include jpayne@68: jpayne@68: struct timeval *ares_timeout(const ares_channel_t *\fIchannel\fP, jpayne@68: struct timeval *\fImaxtv\fP, jpayne@68: struct timeval *\fItv\fP) jpayne@68: .fi jpayne@68: .SH DESCRIPTION jpayne@68: The \fBares_timeout(3)\fP function determines the maximum time for which the jpayne@68: caller should wait before invoking \fIares_process(3)\fP to process timeouts. jpayne@68: The parameter \fImaxtv\fP specifies a existing maximum timeout, or \fBNULL\fP jpayne@68: if the caller does not wish to apply a maximum timeout. The parameter jpayne@68: \fItv\fP must point to a writable buffer of type \fBstruct timeval\fP It is jpayne@68: valid for \fImaxtv\fP and \fItv\fP to have the same value. jpayne@68: jpayne@68: If no queries have timeouts pending sooner than the given maximum timeout, jpayne@68: \fBares_timeout(3)\fP returns the value of \fImaxtv\fP; otherwise jpayne@68: \fBares_timeout(3)\fP stores the appropriate timeout value into the buffer jpayne@68: pointed to by \fItv\fP and returns the value of \fItv\fP. jpayne@68: .SH SEE ALSO jpayne@68: .BR ares_fds (3), jpayne@68: .BR ares_process (3), jpayne@68: .BR ares_process_fd (3)