IPC Server Functions

Functions the deal with IPC server objects. More...

Functions

EAPI Ecore_Ipc_Serverecore_ipc_server_add (Ecore_Ipc_Type compl_type, const char *name, int port, const void *data)
 Creates an IPC server that listens for connections.
EAPI Ecore_Ipc_Serverecore_ipc_server_connect (Ecore_Ipc_Type compl_type, char *name, int port, const void *data)
 Creates an IPC server object to represent the IPC server listening on the given port.
EAPI void * ecore_ipc_server_del (Ecore_Ipc_Server *svr)
 Closes the connection and frees the given IPC server.
EAPI void * ecore_ipc_server_data_get (Ecore_Ipc_Server *svr)
 Retrieves the data associated with the given IPC server.
EAPI Eina_Bool ecore_ipc_server_connected_get (Ecore_Ipc_Server *svr)
 Retrieves whether the given IPC server is currently connected.
EAPI Eina_List * ecore_ipc_server_clients_get (Ecore_Ipc_Server *svr)
 Retrieves the list of clients for this server.
EAPI int ecore_ipc_server_send (Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, const void *data, int size)
 Sends a message to the given IPC server.

Detailed Description

Functions the deal with IPC server objects.


Function Documentation

EAPI Ecore_Ipc_Server* ecore_ipc_server_add ( Ecore_Ipc_Type  compl_type,
const char *  name,
int  port,
const void *  data 
)

Creates an IPC server that listens for connections.

For more details about the compl_type, name and port parameters, see the ecore_con_server_add documentation.

Parameters:
compl_typeThe connection type.
nameName to associate with the socket used for connection.
portNumber to identify with socket used for connection.
dataData to associate with the IPC server.
Returns:
New IPC server. If there is an error, NULL is returned.
Todo:
Need to add protocol type parameter to this function.

References ECORE_CON_LOCAL_SYSTEM, ECORE_CON_LOCAL_USER, and ecore_con_server_add().

Referenced by ecore_evas_extn_socket_listen().

EAPI Eina_List* ecore_ipc_server_clients_get ( Ecore_Ipc_Server svr)

Retrieves the list of clients for this server.

Parameters:
svrThe given IPC server.
Returns:
An Eina_List with the clients.
EAPI Ecore_Ipc_Server* ecore_ipc_server_connect ( Ecore_Ipc_Type  compl_type,
char *  name,
int  port,
const void *  data 
)

Creates an IPC server object to represent the IPC server listening on the given port.

For more details about the compl_type, name and port parameters, see the ecore_con_server_connect documentation.

Parameters:
compl_typeThe IPC connection type.
nameName used to determine which socket to use for the IPC connection.
portNumber used to identify the socket to use for the IPC connection.
dataData to associate with the server.
Returns:
A new IPC server. NULL is returned on error.
Todo:
Need to add protocol type parameter.

References ECORE_CON_LOCAL_SYSTEM, ECORE_CON_LOCAL_USER, and ecore_con_server_connect().

Referenced by ecore_evas_extn_plug_connect().

Retrieves whether the given IPC server is currently connected.

Parameters:
svrThe given IPC server.
Returns:
EINA_TRUE if the server is connected, EINA_FALSE otherwise.

References ecore_con_server_connected_get().

Retrieves the data associated with the given IPC server.

Parameters:
svrThe given IPC server.
Returns:
The associated data.
EAPI void* ecore_ipc_server_del ( Ecore_Ipc_Server svr)

Closes the connection and frees the given IPC server.

Parameters:
svrThe given IPC server.
Returns:
The data associated with the server when it was created.

References ecore_con_server_del(), and ecore_ipc_client_del().

Referenced by ecore_ipc_shutdown().

EAPI int ecore_ipc_server_send ( Ecore_Ipc_Server svr,
int  major,
int  minor,
int  ref,
int  ref_to,
int  response,
const void *  data,
int  size 
)

Sends a message to the given IPC server.

The content of the parameters, excluding the svr paramter, is up to the client.

Parameters:
svrThe given IPC server.
majorMajor opcode of the message.
minorMinor opcode of the message.
refMessage reference number.
ref_toReference number of the message this message refers to.
responseRequires response.
dataThe data to send as part of the message.
sizeLength of the data, in bytes, to send.
Returns:
Number of bytes sent. 0 is returned if there is an error.
Todo:

This function needs to become an IPC message.

Fix up the documentation: Make sure what ref_to and response are.

References ecore_con_server_send().