Ecore Connection Client Functions

Functions that operate on Ecore connection client objects. More...

Typedefs

typedef struct _Ecore_Con_Client Ecore_Con_Client
 A connection handle to a client.

Functions

EAPI int ecore_con_client_send (Ecore_Con_Client *cl, const void *data, int size)
 Sends the given data to the given client.
EAPI Ecore_Con_Serverecore_con_client_server_get (Ecore_Con_Client *cl)
 Retrieves the server representing the socket the client has connected to.
EAPI Eina_Bool ecore_con_client_connected_get (Ecore_Con_Client *cl)
 Returns whether the client is still connected.
EAPI void ecore_con_client_timeout_set (Ecore_Con_Client *cl, double timeout)
 Set the time after which the client will be disconnected when inactive.
EAPI double ecore_con_client_timeout_get (Ecore_Con_Client *cl)
 Get the default time after which the client will be disconnected when inactive.
EAPI void * ecore_con_client_del (Ecore_Con_Client *cl)
 Closes the connection and frees memory allocated to the given client.
EAPI void ecore_con_client_data_set (Ecore_Con_Client *cl, const void *data)
 Sets the data associated with the given client to data.
EAPI void * ecore_con_client_data_get (Ecore_Con_Client *cl)
 Retrieves the data associated with the given client.
EAPI const char * ecore_con_client_ip_get (Ecore_Con_Client *cl)
 Gets the IP address of a cleint that has connected.
EAPI double ecore_con_client_uptime_get (Ecore_Con_Client *cl)
 Check how long a client has been connected.
EAPI void ecore_con_client_flush (Ecore_Con_Client *cl)
 Flushes all pending data to the given client.
EAPI int ecore_con_ssl_available_get (void)
 Returns if SSL support is available.
EAPI int ecore_ipc_ssl_available_get (void)
 Returns if SSL support is available.

Detailed Description

Functions that operate on Ecore connection client objects.


Function Documentation

EAPI Eina_Bool ecore_con_client_connected_get ( Ecore_Con_Client cl)

Returns whether the client is still connected.

Parameters:
clThe given client.
Returns:
#EINA_TRUE if connected, else EINA_FALSE
EAPI void * ecore_con_client_data_get ( Ecore_Con_Client cl)

Retrieves the data associated with the given client.

Parameters:
clThe given client.
Returns:
The data associated with cl.
EAPI void ecore_con_client_data_set ( Ecore_Con_Client cl,
const void *  data 
)

Sets the data associated with the given client to data.

Parameters:
clThe given client.
dataWhat to set the data to.
EAPI void * ecore_con_client_del ( Ecore_Con_Client cl)

Closes the connection and frees memory allocated to the given client.

Parameters:
clThe given client.
Returns:
Data associated with the client.

References ecore_main_fd_handler_del().

Referenced by ecore_ipc_client_del().

EAPI void ecore_con_client_flush ( Ecore_Con_Client cl)

Flushes all pending data to the given client.

Will return when done.

Parameters:
clThe given client.

Referenced by ecore_ipc_client_flush().

EAPI const char * ecore_con_client_ip_get ( Ecore_Con_Client cl)

Gets the IP address of a cleint that has connected.

Parameters:
clThe given client.
Returns:
A pointer to an internal string that contains the IP address of the connected client in the form "XXX.YYY.ZZZ.AAA" IP notation. This string should not be modified or trusted to stay valid after deletion for the cl object. If no IP is known NULL is returned.
Examples:
ecore_con_server_example.c.

Referenced by ecore_ipc_client_ip_get().

EAPI int ecore_con_client_send ( Ecore_Con_Client cl,
const void *  data,
int  size 
)

Sends the given data to the given client.

Parameters:
clThe given client.
dataThe given data.
sizeLength of the data, in bytes, to send.
Returns:
The number of bytes sent. 0 will be returned if there is an error.
Examples:
ecore_con_server_example.c.

References ECORE_CON_REMOTE_UDP, ECORE_FD_READ, ECORE_FD_WRITE, and ecore_main_fd_handler_active_set().

Referenced by ecore_ipc_client_send().

EAPI Ecore_Con_Server * ecore_con_client_server_get ( Ecore_Con_Client cl)

Retrieves the server representing the socket the client has connected to.

Parameters:
clThe given client.
Returns:
The server that the client connected to.

Referenced by ecore_ipc_client_del(), and ecore_ipc_client_server_get().

EAPI double ecore_con_client_timeout_get ( Ecore_Con_Client cl)

Get the default time after which the client will be disconnected when inactive.

Parameters:
clThe client object
Returns:
The timeout, in seconds, to disconnect after This function is used to get the idle timeout for a client. A value of < 1 means the idle timeout is disabled.
EAPI void ecore_con_client_timeout_set ( Ecore_Con_Client cl,
double  timeout 
)

Set the time after which the client will be disconnected when inactive.

Parameters:
clThe client object
timeoutThe timeout, in seconds, to disconnect after This function is used to set the idle timeout on a client. A value of < 1 disables the idle timeout.
Examples:
ecore_con_server_example.c.
EAPI double ecore_con_client_uptime_get ( Ecore_Con_Client cl)

Check how long a client has been connected.

Parameters:
clThe client to check
Returns:
The total time, in seconds, that the client has been connected to the server This function is used to find out how long a client has been connected for.

References ecore_time_get().

EAPI int ecore_con_ssl_available_get ( void  )

Returns if SSL support is available.

Returns:
1 if SSL is available and provided by gnutls, 2 if provided by openssl, 0 if it is not available.

Referenced by ecore_ipc_ssl_available_get().

EAPI int ecore_ipc_ssl_available_get ( void  )

Returns if SSL support is available.

Returns:
1 if SSL is available, 0 if it is not.

References ecore_con_ssl_available_get().