ares_timeout.3 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_TIMEOUT 3 "25 July 1998"
  17. .SH NAME
  18. ares_timeout \- return maximum time to wait
  19. .SH SYNOPSIS
  20. .nf
  21. #include <ares.h>
  22. struct timeval *ares_timeout(ares_channel \fIchannel\fP,
  23. struct timeval *\fImaxtv\fP,
  24. struct timeval *\fItv\fP)
  25. .fi
  26. .SH DESCRIPTION
  27. The \fBares_timeout(3)\fP function determines the maximum time for which the
  28. caller should wait before invoking \fIares_process(3)\fP to process timeouts.
  29. The parameter \fImaxtv\fP specifies a existing maximum timeout, or \fBNULL\fP
  30. if the caller does not wish to apply a maximum timeout. The parameter
  31. \fItv\fP must point to a writable buffer of type \fBstruct timeval\fP It is
  32. valid for \fImaxtv\fP and \fItv\fP to have the same value.
  33. If no queries have timeouts pending sooner than the given maximum timeout,
  34. \fBares_timeout(3)\fP returns the value of \fImaxtv\fP; otherwise
  35. \fBares_timeout(3)\fP stores the appropriate timeout value into the buffer
  36. pointed to by \fItv\fP and returns the value of \fItv\fP.
  37. .SH SEE ALSO
  38. .BR ares_fds (3),
  39. .BR ares_process (3),
  40. .BR ares_process_fd (3)
  41. .SH AUTHOR
  42. Greg Hudson, MIT Information Systems
  43. .br
  44. Copyright 1998 by the Massachusetts Institute of Technology.