CONNECTBYADDRINFO(3)                                      CONNECTBYADDRINFO(3)



NAME
       connectbyaddrinfo - initiate an IP version agnostic connection

SYNOPSIS
       #include <easyv6.h>

       int connectbyaddrinfo(const struct addrinfo *addresses,
                         long long timeout, struct CONNECTOPTIONS *options);

DESCRIPTION
       The connectbyaddrinfo() function works identically to connectbyname (3)
       except it takes an addrinfo structure instead of a name and service.

       Use of connectbyaddrinfo() is STRONGLY DISCOURAGED. It  is  not  future
       proof:  future  SOCK_STREAM protocols which can change addresses during
       flight based on the host name will not be compatible with  connectbyad-
       drinfo().

RETURN VALUE
       On success, a file descriptor for the new connected socket is returned.
       On error, -1 is returned, and errno is set appropriately.

       Note that the returned socket will be in non-blocking mode. If blocking
       mode is desired, use fcntl().

ERRORS
       See connectbyname (3)


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

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



                                March 18, 2012            CONNECTBYADDRINFO(3)
