getaddrinfo(host,
port,
family=0,
socktype=1,
proto=0,
allow_cname=True)
| source code
|
Resolve host and port into addrinfo struct.
Does the same thing as socket.getaddrinfo, but using pyxmpp.resolver. This
makes it possible to reuse data (A records from the additional section of
DNS reply) returned with SRV records lookup done using this module.
- Parameters:
host (unicode or str ) - service domain name.
port (int or str ) - service port number or name.
family (int ) - address family.
socktype (int ) - socket type.
proto (int or str ) - protocol number or name.
allow_cname (bool ) - when False CNAME responses are not allowed.
- Returns:
list of (int , int , int , str , (str , int ))
- list of (family, socktype, proto, canonname, sockaddr).
|