efl.ecore_con.Lookup
Class¶efl.ecore_con.
Lookup
(name, done_cb, *args, **kargs)¶Bases: object
A simple class to perform asynchronous DNS lookups.
Parameters: |
|
---|
New in version 1.17.
Just create an instance and give a callback function to be called when the operation is complete.
This class performs a DNS lookup on the hostname specified by name, then calls done_cb with the result and the data given as parameter. The result will be given to the done_cb as follows:
expected `done_cb` signature:
func(canonname, ip, sockaddr)
Usage example:
import ecore_con
def done_cb(canonname, ip, sockaddr):
print(canonname)
print(ip)
ecore_con.Lookup('example.com', done_cb)