puyv.dns
— Asynchronous getaddrinfo and getnameinfo¶
-
pyuv.dns.
getaddrinfo
(loop, ..., callback=None)¶ Equivalent of socket.getaddrinfo. When callback is not None, this function returns a GAIRequest object which has a cancel() method that can be called in order to cancel the request.
Callback signature:
callback(result, errorno)
.When callback is None, this function is synchronous.
-
pyuv.dns.
getnameinfo
(loop, ..., callback=None)¶ Equivalent of socket.getnameinfo. When callback is not None, this function returns a GNIRequest object which has a cancel() method that can be called in order to cancel the request.
Callback signature:
callback(result, errorno)
.When callback is None, this function is synchronous.
Note
libuv used to bundle c-ares in the past, so the c-ares bindings
are now also a separated project.
The examples directory contains an example
on how to build a full DNS resolver using the Channel
class provided by pycares
together with pyuv.