ares_timeout.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_TIMEOUT 3 "25 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 struct timeval *ares_timeout(ares_channel \fIchannel\fP,
  25. .B struct timeval *\fImaxtv\fP, struct timeval *\fItvbuf\fP)
  26. .fi
  27. .SH DESCRIPTION
  28. The
  29. .B ares_timeout
  30. function determines the maximum time for which the caller should wait before
  31. invoking \fIares_process(3)\fP to process timeouts. The parameter
  32. .I maxtv
  33. specifies a existing maximum timeout, or
  34. .B NULL
  35. if the caller does not wish to apply a maximum timeout. The parameter
  36. .I tvbuf
  37. must point to a writable buffer of type
  38. .BR "struct timeval" .
  39. It is valid for
  40. .I maxtv
  41. and
  42. .I tvbuf
  43. to have the same value.
  44. .PP
  45. If no queries have timeouts pending sooner than the given maximum
  46. timeout,
  47. .B ares_timeout
  48. returns the value of
  49. .IR maxtv;
  50. otherwise
  51. .B ares_timeout
  52. stores the appropriate timeout value into the buffer pointed to by
  53. .I tvbuf
  54. and returns the value of
  55. .IR tvbuf .
  56. .SH SEE ALSO
  57. .BR ares_fds (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.