Tizen(Headed) Native API
6.5
|
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:
Functions | |
int | ecore_con_init (void) |
Initializes the Ecore_Con library. | |
int | ecore_con_shutdown (void) |
Shuts down the Ecore_Con library. | |
Eina_Bool | ecore_con_lookup (const char *name, Ecore_Con_Dns_Cb done_cb, const void *data) |
Do an asynchronous DNS lookup. | |
Typedefs | |
typedef void(* | Ecore_Con_Dns_Cb )(const char *canonname, const char *ip, struct sockaddr *addr, int addrlen, void *data) |
Typedef Documentation
A callback type for use with ecore_con_lookup.
Function Documentation
int ecore_con_init | ( | void | ) |
Initializes the Ecore_Con library.
- Returns:
- Number of times the library has been initialised without being shut down.
- Note:
- This function already calls ecore_init() internally, so you don't need to call it explicitly.
- Since :
- 3.0
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.
- Parameters:
-
[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.
- Returns:
true
if the request did not fail to be set up,false
otherwise.
- Since :
- 3.0
- Examples:
- ecore_con_lookup_example.c.
int ecore_con_shutdown | ( | void | ) |
Shuts down the Ecore_Con library.
- Returns:
- Number of times the library has been initialised without being shut down.
- Note:
- This function already calls ecore_shutdown() internally, so you don't need to call it explicitly unless you called ecore_init() explicitly too.
- Since :
- 3.0