ares_fds.3 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_FDS 3 "23 July 1998"
  17. .SH NAME
  18. ares_fds \- return file descriptors to select on
  19. .SH SYNOPSIS
  20. .nf
  21. #include <ares.h>
  22. int ares_fds(ares_channel \fIchannel\fP,
  23. fd_set *\fIread_fds\fP,
  24. fd_set *\fIwrite_fds\fP)
  25. .fi
  26. .SH DESCRIPTION
  27. The \fBares_fds(3)\fP function retrieves the set of file descriptors which the
  28. calling application should select on for reading and writing for the
  29. processing of name service queries pending on the name service channel
  30. identified by \fIchannel\fP.
  31. File descriptors will be set in the file descriptor sets pointed to by
  32. \fIread_fds\fP and \fIwrite_fds\fP as appropriate. File descriptors already
  33. set in \fIread_fds\fP and \fIwrite_fds\fP will remain set; initialization of
  34. the file descriptor sets (using \fBFD_ZERO\fP) is the responsibility of the
  35. caller.
  36. .SH RETURN VALUES
  37. \fBares_fds(3)\fP returns a value that is one greater than the number of the
  38. highest socket set in either \fIread_fds\fP or \fIwrite_fds\fP. If no queries
  39. are active, \fBares_fds(3)\fP returns 0.
  40. .SH SEE ALSO
  41. .BR ares_timeout (3),
  42. .BR ares_process (3)
  43. .SH AUTHOR
  44. Greg Hudson, MIT Information Systems
  45. .br
  46. Copyright 1998 by the Massachusetts Institute of Technology.