Utility functions that set up and shut down the Ecore Connection library. More...
Typedefs | |
typedef void(* | Ecore_Con_Dns_Cb) (const char *canonname, const char *ip, struct sockaddr *addr, int addrlen, void *data) |
A callback type for use with ecore_con_lookup. | |
Functions | |
EAPI int | ecore_con_init (void) |
Initializes the Ecore_Con library. More... | |
EAPI int | ecore_con_shutdown (void) |
Shuts down the Ecore_Con library. More... | |
EAPI Eina_Bool | ecore_con_lookup (const char *name, Ecore_Con_Dns_Cb done_cb, const void *data) |
Do an asynchronous DNS lookup. More... | |
Utility functions that set up and shut down the Ecore Connection library.
There's also ecore_con_lookup() that can be used to make simple asynchronous DNS lookups.
A simple example of how to use these functions:
EAPI int ecore_con_init | ( | void | ) |
Initializes the Ecore_Con library.
References ecore_init(), eina_error_msg_static_register(), eina_init(), eina_log_domain_register(), eina_log_timing(), and evil_init().
Referenced by ecore_con_url_init(), and ecore_ipc_init().
EAPI int ecore_con_shutdown | ( | void | ) |
Shuts down the Ecore_Con library.
References eina_log_timing(), and ERR.
Referenced by ecore_con_url_init(), ecore_con_url_shutdown(), and elm_quicklaunch_sub_shutdown().
EAPI Eina_Bool ecore_con_lookup | ( | const char * | name, |
Ecore_Con_Dns_Cb | done_cb, | ||
const void * | data | ||
) |
Do an asynchronous DNS lookup.
This function 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:
canonname - the canonical name of the address, ip - the resolved ip address, addr - a pointer to the socket address, addrlen - the length of the socket address, in bytes, data - the data pointer given as parameter.
[in] | name | IP address or server name to translate. |
[in] | done_cb | Callback to notify when done. |
[in] | data | User data to be given to done_cb. |
true
if the request did not fail to be set up, false
otherwise.