Sockets Toolkit - getaddrinfo


Loadable Function: addrinforesults = getaddrinfo (hostname, service, hints)

Get addressinfo lookup for a hostname/service.

Returns an array of addressinfo structs with the following fields:

family

Integer family value

socktype

Integer socktype value

protocol

Integer protocol value

addr

a string with the host name to send to

port

the port number to send to (an integer)

hints is optional with one or more fields:

family

Integer family value

socktype

Integer socktype value

protocol

Integer protocol value

flags

a integer ai flags

See the getaddrinfo man pages for details.