add flush calls.

SVN revision: 28376
This commit is contained in:
Carsten Haitzler 2007-02-16 18:12:38 +00:00
parent 6b044dfb13
commit d6dff9cb77
4 changed files with 75 additions and 0 deletions

View File

@ -155,6 +155,7 @@ extern "C" {
EAPI int ecore_con_server_send(Ecore_Con_Server *svr, const void *data, int size);
EAPI void ecore_con_server_client_limit_set(Ecore_Con_Server *svr, int client_limit, char reject_excess_clients);
EAPI char *ecore_con_server_ip_get(Ecore_Con_Server *svr);
EAPI void ecore_con_server_flush(Ecore_Con_Server *svr);
EAPI int ecore_con_client_send(Ecore_Con_Client *cl, void *data, int size);
EAPI Ecore_Con_Server *ecore_con_client_server_get(Ecore_Con_Client *cl);
@ -162,6 +163,7 @@ extern "C" {
EAPI void ecore_con_client_data_set(Ecore_Con_Client *cl, const void *data);
EAPI void *ecore_con_client_data_get(Ecore_Con_Client *cl);
EAPI char *ecore_con_client_ip_get(Ecore_Con_Client *cl);
EAPI void ecore_con_client_flush(Ecore_Con_Client *cl);
EAPI int ecore_con_ssl_available_get(void);

View File

@ -739,6 +739,24 @@ ecore_con_server_ip_get(Ecore_Con_Server *svr)
return svr->ip;
}
/**
* Flushes all pending data to the given server. Will return when done.
*
* @param svr The given server.
* @ingroup Ecore_Con_Server_Group
*/
EAPI void
ecore_con_server_flush(Ecore_Con_Server *svr)
{
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER,
"ecore_con_server_flush");
return;
}
_ecore_con_server_flush(svr);
}
/**
* @defgroup Ecore_Con_Client_Group Ecore Connection Client Functions
*
@ -902,6 +920,24 @@ ecore_con_client_ip_get(Ecore_Con_Client *cl)
return cl->ip;
}
/**
* Flushes all pending data to the given client. Will return when done.
*
* @param cl The given client.
* @ingroup Ecore_Con_Client_Group
*/
EAPI void
ecore_con_client_flush(Ecore_Con_Client *cl)
{
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT,
"ecore_con_client_flush");
return;
}
_ecore_con_client_flush(cl);
}
/**
* Returns if SSL support is available
* @return 1 if SSL is available, 0 if it is not.

View File

@ -303,6 +303,7 @@ EAPI unsigned long long _ecore_ipc_swap_64(unsigned long long v);
EAPI void ecore_ipc_server_data_size_max_set(Ecore_Ipc_Server *srv, int size);
EAPI int ecore_ipc_server_data_size_max_get(Ecore_Ipc_Server *srv);
EAPI char *ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr);
EAPI void ecore_ipc_server_flush(Ecore_Ipc_Server *svr);
/* FIXME: this needs to become an ipc message */
EAPI int ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int ref_to, int response, void *data, int size);
@ -313,6 +314,7 @@ EAPI unsigned long long _ecore_ipc_swap_64(unsigned long long v);
EAPI void ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client *cl, int size);
EAPI int ecore_ipc_client_data_size_max_get(Ecore_Ipc_Client *cl);
EAPI char *ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl);
EAPI void ecore_ipc_client_flush(Ecore_Ipc_Client *cl);
EAPI int ecore_ipc_ssl_available_get(void);
/* FIXME: need to add a callback to "ok" large ipc messages greater than */

View File

@ -693,6 +693,23 @@ ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr)
return ecore_con_server_ip_get(svr->server);
}
/**
* Flushes all pending data to the given server. Will return when done.
*
* @param svr The given server.
* @ingroup Ecore_Ipc_Server_Group
*/
EAPI void
ecore_ipc_server_flush(Ecore_Ipc_Server *svr)
{
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
"ecore_ipc_server_server_flush");
return;
}
ecore_con_server_flush(svr->server);
}
#define CLENC(_member) \
d = _ecore_ipc_dlt_int(msg._member, cl->prev.o._member, &md); \
@ -938,6 +955,24 @@ ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl)
return ecore_con_client_ip_get(cl->client);
}
/**
* Flushes all pending data to the given client. Will return when done.
*
* @param cl The given client.
* @ingroup Ecore_Ipc_Client_Group
*/
EAPI void
ecore_ipc_client_flush(Ecore_Ipc_Client *cl)
{
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
"ecore_ipc_client_flush");
return;
}
ecore_con_client_flush(cl->client);
}
/**
* Returns if SSL support is available
* @return 1 if SSL is available, 0 if it is not.