Previous: posix socket addresses rep, Up: posix socket addresses [Index]
Scheme level representation of struct addrinfo.  It has the
following fields:
ai_flagsFixnum.
ai_familyFixnum, specifies the Internet address family; AF_INET,
AF_INET6 of AF_UNSPEC.
ai_socktypeFixnum, specifies the socket type; SOCK_STREAM, SOCK_DGRAM
or other SOCK_ value.
ai_protocolFixnum, specifies the protocol of the socket address.
ai_addrlenFixnum, the number of bytes in the bytevector referenced by
ai_addr.
ai_addrBytevector, holds an instance of struct sockaddr of
ai_addrlen bytes.
ai_canonnameFalse or bytevector, represents the canoncal name of the host when available.
Build and return an instance of struct-addrinfo.
Return true if obj is an instance of struct-addrinfo.
Accessors for the fields of struct-addrinfo.
Interface to the C function getaddrinfo(), see the manual page
getaddrinfo(3).  Given the strings or bytevectors node and
service identifying an Internet host and a service, build a list
of struct-addrinfo instances representing addresses to which
sockets can be bound or connected.
Both node and service can be false, in which case the
corresponding arguments handed to the C function are NULL.  The
optional argument hints must be #f or an instance of
struct-addrinfo used to select matching hosts.
If successful: return the list of data structures, else raise an exception.
(px.getaddrinfo "github.com" "smtp")
⇒ (#["struct-addrinfo"
        ai_flags=40             ai_family=AF_INET
        ai_socktype=SOCK_DGRAM  ai_protocol=17
        ai_addrlen=16
        ai_addr=#vu8(2 0 0 25 207 97 227 239 0 0 0 0 0 0 0 0)
        ai_canonname=#f]
    #["struct-addrinfo"
        ai_flags=40             ai_family=AF_INET
        ai_socktype=SOCK_STREAM ai_protocol=6
        ai_addrlen=16
        ai_addr=#vu8(2 0 0 25 207 97 227 239 0 0 0 0 0 0 0 0)
        ai_canonname=#f])
Previous: posix socket addresses rep, Up: posix socket addresses [Index]