forked from enlightenment/efl
add ecore_con_client_connected_get to avoid people scratching their heads and wondering how the hell they're supposed to know if a client has disconnected
SVN revision: 54204
This commit is contained in:
parent
a5489cd5c7
commit
e289280418
|
@ -448,6 +448,7 @@ EAPI void ecore_con_client_flush(Ecore_Con_Client *cl);
|
||||||
EAPI double ecore_con_client_uptime_get(Ecore_Con_Client *cl);
|
EAPI double ecore_con_client_uptime_get(Ecore_Con_Client *cl);
|
||||||
EAPI double ecore_con_client_timeout_get(Ecore_Con_Client *cl);
|
EAPI double ecore_con_client_timeout_get(Ecore_Con_Client *cl);
|
||||||
EAPI void ecore_con_client_timeout_set(Ecore_Con_Client *cl, double timeout);
|
EAPI void ecore_con_client_timeout_set(Ecore_Con_Client *cl, double timeout);
|
||||||
|
EAPI Eina_Bool ecore_con_client_connected_get(Ecore_Con_Client *cl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -922,6 +922,24 @@ ecore_con_client_server_get(Ecore_Con_Client *cl)
|
||||||
return cl->host_server;
|
return cl->host_server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the client is still connected
|
||||||
|
* @param cl The given client.
|
||||||
|
* @return #EINA_TRUE if connected, else EINA_FALSE
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
ecore_con_client_connected_get(Ecore_Con_Client *cl)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT,
|
||||||
|
"ecore_con_client_connected_get");
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !cl->dead;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the time after which the client will be disconnected when inactive
|
* Set the time after which the client will be disconnected when inactive
|
||||||
* @param cl The client object
|
* @param cl The client object
|
||||||
|
|
Loading…
Reference in New Issue