blob: 743e45e42436ec67b218dcb8f1588ce3fa0c4f7d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.\"
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_FDS 3 "23 July 1998"
17.SH NAME
18ares_fds \- Get file descriptors to select on for name service
19.SH SYNOPSIS
20.nf
21.B #include <ares.h>
22.PP
23.B int ares_fds(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
24.B fd_set *\fIwrite_fds\fP)
25.fi
26.SH DESCRIPTION
27The
28.B ares_fds
29function retrieves the set of file descriptors which the calling
30application should select on for reading and writing for the
31processing of name service queries pending on the name service channel
32identified by
33.IR channel .
34File descriptors will be set in the file descriptor sets pointed to by
35.I read_fds
36and
37.I write_fds
38as appropriate. File descriptors already set in
39.I read_fds
40and
41.I write_fds
42will remain set; initialization of the file descriptor sets
43(using
44.BR FD_ZERO )
45is the responsibility of the caller.
46.SH RETURN VALUES
47.B ares_fds
48returns one greater than the number of the highest socket set in either
49.I read_fds
50or
51.IR write_fds .
52If no queries are active,
53.B ares_fds
54will return 0.
55.SH SEE ALSO
56.BR ares_timeout (3),
57.BR ares_process (3)
58.SH AUTHOR
59Greg Hudson, MIT Information Systems
60.br
61Copyright 1998 by the Massachusetts Institute of Technology.