Tizen Native API
5.5
|
Functions the deal with IPC server objects.
Functions | |
Ecore_Ipc_Server * | ecore_ipc_server_add (Ecore_Ipc_Type type, const char *name, int port, const void *data) |
Creates an IPC server that listens for connections. | |
Ecore_Ipc_Server * | ecore_ipc_server_connect (Ecore_Ipc_Type type, char *name, int port, const void *data) |
Creates an IPC server object to represent the IPC server listening on the given port. | |
void * | ecore_ipc_server_del (Ecore_Ipc_Server *svr) |
Closes the connection and frees the given IPC server. | |
void * | ecore_ipc_server_data_get (Ecore_Ipc_Server *svr) |
Retrieves the data associated with the given IPC server. | |
Eina_Bool | ecore_ipc_server_connected_get (Ecore_Ipc_Server *svr) |
Retrieves whether the given IPC server is currently connected. | |
Eina_List * | ecore_ipc_server_clients_get (Ecore_Ipc_Server *svr) |
Retrieves the list of clients for this server. | |
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. | |
void | ecore_ipc_server_client_limit_set (Ecore_Ipc_Server *svr, int client_limit, char reject_excess_clients) |
Sets a limit on the number of clients that can be handled concurrently by the given server, and a policy on what to do if excess clients try to connect. Beware that if you set this once ecore is already running, you may already have pending CLIENT_ADD events in your event queue. Those clients have already connected and will not be affected by this call. Only clients subsequently trying to connect will be affected. | |
void | ecore_ipc_server_data_size_max_set (Ecore_Ipc_Server *svr, int size) |
Sets the max data payload size for an Ipc message in bytes. | |
int | ecore_ipc_server_data_size_max_get (Ecore_Ipc_Server *svr) |
Gets the max data payload size for an Ipc message in bytes. | |
const char * | ecore_ipc_server_ip_get (Ecore_Ipc_Server *svr) |
Gets the IP address of a server that has been connected to. | |
void | ecore_ipc_server_flush (Ecore_Ipc_Server *svr) |
Flushes all pending data to the given server. Will return when done. |
Ecore_Ipc_Server* ecore_ipc_server_add | ( | Ecore_Ipc_Type | type, |
const char * | name, | ||
int | port, | ||
const void * | data | ||
) |
Creates an IPC server that listens for connections.
For more details about the type
, name
and port
parameters, see the ecore_con_server_add documentation.
type | The connection type. |
name | Name to associate with the socket used for connection. |
port | Number to identify with socket used for connection. |
data | Data to associate with the IPC server. |
NULL
is returned. void ecore_ipc_server_client_limit_set | ( | Ecore_Ipc_Server * | svr, |
int | client_limit, | ||
char | reject_excess_clients | ||
) |
Sets a limit on the number of clients that can be handled concurrently by the given server, and a policy on what to do if excess clients try to connect. Beware that if you set this once ecore is already running, you may already have pending CLIENT_ADD events in your event queue. Those clients have already connected and will not be affected by this call. Only clients subsequently trying to connect will be affected.
svr | The given server. |
client_limit | The maximum number of clients to handle concurrently. -1 means unlimited (default). 0 effectively disables the server. |
reject_excess_clients | Set to 1 to automatically disconnect excess clients as soon as they connect if you are already handling client_limit clients. Set to 0 (default) to just hold off on the "accept()" system call until the number of active clients drops. This causes the kernel to queue up to 4096 connections (or your kernel's limit, whichever is lower). |
Retrieves the list of clients for this server.
svr | The given IPC server. |
Ecore_Ipc_Server* ecore_ipc_server_connect | ( | Ecore_Ipc_Type | 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 type
, name
and port
parameters, see the ecore_con_server_connect documentation.
type | The IPC connection type. |
name | Name used to determine which socket to use for the IPC connection. |
port | Number used to identify the socket to use for the IPC connection. |
data | Data to associate with the server. |
NULL
is returned on error. Retrieves whether the given IPC server is currently connected.
svr | The given IPC server. |
EINA_TRUE
if the server is connected, EINA_FALSE
otherwise.void* ecore_ipc_server_data_get | ( | Ecore_Ipc_Server * | svr | ) |
Retrieves the data associated with the given IPC server.
svr | The given IPC server. |
int ecore_ipc_server_data_size_max_get | ( | Ecore_Ipc_Server * | svr | ) |
Gets the max data payload size for an Ipc message in bytes.
svr | The given server. |
void ecore_ipc_server_data_size_max_set | ( | Ecore_Ipc_Server * | svr, |
int | size | ||
) |
Sets the max data payload size for an Ipc message in bytes.
svr | The given server. |
size | The maximum data payload size in bytes. |
void* ecore_ipc_server_del | ( | Ecore_Ipc_Server * | svr | ) |
Closes the connection and frees the given IPC server.
svr | The given IPC server. |
void ecore_ipc_server_flush | ( | Ecore_Ipc_Server * | svr | ) |
Flushes all pending data to the given server. Will return when done.
svr | The given server. |
const char* ecore_ipc_server_ip_get | ( | Ecore_Ipc_Server * | svr | ) |
Gets the IP address of a server that has been connected to.
svr | The given server. |
svr
object. If no IP is known NULL is returned.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
parameter, is up to the client.
svr | The given IPC server. |
major | Major opcode of the message. |
minor | Minor opcode of the message. |
ref | Message reference number. |
ref_to | Reference number of the message this message refers to. |
response | Requires response. |
data | The data to send as part of the message. |
size | Length of the data, in bytes, to send. |
0
is returned if there is an error.