ares_fds.3 1.8 KB

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