ares_create_query.c: IRIX compilation fix
[platform/upstream/c-ares.git] / ares_timeout.3
1 .\"
2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
3 .\"
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose.  It is provided "as is"
14 .\" without express or implied warranty.
15 .\"
16 .TH ARES_TIMEOUT 3 "25 July 1998"
17 .SH NAME
18 ares_timeout \- return maximum time to wait
19 .SH SYNOPSIS
20 .nf
21 .B #include <ares.h>
22 .PP
23 .B struct timeval *ares_timeout(ares_channel \fIchannel\fP,
24 .B      struct timeval *\fImaxtv\fP, struct timeval *\fItv\fP)
25 .fi
26 .SH DESCRIPTION
27 The
28 .B ares_timeout
29 function determines the maximum time for which the caller should wait before
30 invoking \fIares_process(3)\fP to process timeouts.  The parameter
31 .I maxtv
32 specifies a existing maximum timeout, or
33 .B NULL
34 if the caller does not wish to apply a maximum timeout.  The parameter
35 .I tv
36 must point to a writable buffer of type
37 .BR "struct timeval" .
38 It is valid for
39 .I maxtv
40 and
41 .I tv
42 to have the same value.
43 .PP
44 If no queries have timeouts pending sooner than the given maximum
45 timeout,
46 .B ares_timeout
47 returns the value of
48 .IR maxtv;
49 otherwise
50 .B ares_timeout
51 stores the appropriate timeout value into the buffer pointed to by
52 .I tv
53 and returns the value of
54 .IR tv .
55 .SH SEE ALSO
56 .BR ares_fds (3),
57 .BR ares_process (3)
58 .SH AUTHOR
59 Greg Hudson, MIT Information Systems
60 .br
61 Copyright 1998 by the Massachusetts Institute of Technology.