TIMEOUTGETADDRINFO(3)                                    TIMEOUTGETADDRINFO(3)



NAME
       timeoutgetaddrinfo - getaddrinfo with a time out

SYNOPSIS
       #include <easyv6.h>

       int timeoutgetaddrinfo(const char *node, const char *service,
                              struct addrinfo *hints, struct addrinfo ** res,
                              long long timeout);

DESCRIPTION
       Works  just  like getaddrinfo (3) except timeoutgetaddrinfo will return
       with an error if it takes longer the timeout milliseconds to  complete.
       Avoid setting the timeout under 5 seconds (5000 ms).

       Note  that timeoutgetaddrinfo() works by calling getaddrinfo_a(), a GNU
       libc extension. getaddrinfo_a, in turn, spawns a thread  which  does  a
       blocking  getaddrinfo().  Because that thread is not guaranteed to com-
       plete in a timely manner, it will  continue  even  after  timeoutgetad-
       drinfo()  returns due to a time out. Resources allocated to that thread
       will be cleaned up in by later call to timeoutgetaddrinfo() or when the
       program overall ends.

       See getaddrinfo (3) for more.

RETURN VALUE
       See getaddrinfo (3)

SEE ALSO
       addrinfototext(3),        connectbyaddrinfo(3),       connectbyname(3),
       getpeernametext(3), listenbyname(3),

AUTHOR
       libeasyv6 was written by William Herrin <bill@herrin.us>.



                                March 18, 2012           TIMEOUTGETADDRINFO(3)
