3 .\" Copyright 1998 by the Massachusetts Institute of Technology.
5 .\" Permission to use, copy, modify, and distribute this
6 .\" software and its documentation for any purpose and without
7 .\" fee is hereby granted, provided that the above copyright
8 .\" notice appear in all copies and that both that copyright
9 .\" notice and this permission notice appear in supporting
10 .\" documentation, and that the name of M.I.T. not be used in
11 .\" advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.
13 .\" M.I.T. makes no representations about the suitability of
14 .\" this software for any purpose. It is provided "as is"
15 .\" without express or implied warranty.
17 .TH ARES_PROCESS 3 "25 July 1998"
19 ares_process \- Process events for name resolution
24 .B void ares_process(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
25 .B fd_set *\fIwrite_fds\fP)
30 function handles input/output events and timeouts associated with
31 queries pending on the name service channel identified by
33 The file descriptor sets pointed to by
37 should have file descriptors set in them according to whether the file
38 descriptors specified by
40 are ready for reading and writing. (The easiest way to determine this
41 information is to invoke
43 with a timeout no greater than the timeout given by
44 .BR ares_timeout (3)).
48 function will invoke callbacks for pending queries if they complete
51 The following code fragment waits for all pending queries on a channel
57 fd_set readers, writers;
58 struct timeval tv, *tvp;
64 nfds = ares_fds(channel, &readers, &writers);
67 tvp = ares_timeout(channel, NULL, &tv);
68 count = select(nfds, &readers, &writers, NULL, tvp);
69 ares_process(channel, &readers, &writers);
77 Greg Hudson, MIT Information Systems
79 Copyright 1998 by the Massachusetts Institute of Technology.