if (!svr->name)
goto error;
+ svr->start_time = ecore_time_get();
svr->type = compl_type;
svr->port = port;
svr->data = (void *)data;
svr->client_disconnect_time = timeout;
else
svr->disconnect_time = timeout;
+
+ _ecore_con_server_timer_update(svr);
}
EAPI double
cl->event_count = eina_list_append(cl->event_count, e);
cl->host_server->event_count = eina_list_append(cl->host_server->event_count, e);
_ecore_con_cl_timer_update(cl);
+ cl->start_time = ecore_time_get();
e->client = cl;
if (cl->upgrade) ev = ECORE_CON_EVENT_CLIENT_UPGRADE;
ecore_event_add(ev, e,
}
}
cl->host_server->clients = eina_list_remove(cl->host_server->clients, cl);
+ --cl->host_server->client_count;
#ifdef _WIN32
ecore_con_local_win32_client_del(cl);
if (svr->disconnect_time > 0)
{
if (svr->until_deletion)
- ecore_timer_interval_set(svr->until_deletion, svr->disconnect_time);
+ {
+ ecore_timer_interval_set(svr->until_deletion, svr->disconnect_time);
+ ecore_timer_reset(svr->until_deletion);
+ }
else
svr->until_deletion = ecore_timer_add(svr->disconnect_time, (Ecore_Task_Cb)_ecore_con_server_timer, svr);
}
if (cl->disconnect_time > 0)
{
if (cl->until_deletion)
- ecore_timer_interval_set(cl->until_deletion, cl->disconnect_time);
+ {
+ ecore_timer_interval_set(cl->until_deletion, cl->disconnect_time);
+ ecore_timer_reset(cl->until_deletion);
+ }
else
cl->until_deletion = ecore_timer_add(cl->disconnect_time, (Ecore_Task_Cb)_ecore_con_client_timer, cl);
}
if (cl->host_server->client_disconnect_time > 0)
{
if (cl->until_deletion)
- ecore_timer_interval_set(cl->until_deletion, cl->host_server->client_disconnect_time);
+ {
+ ecore_timer_interval_set(cl->until_deletion, cl->host_server->client_disconnect_time);
+ ecore_timer_reset(cl->until_deletion);
+ }
else
cl->until_deletion = ecore_timer_add(cl->host_server->client_disconnect_time, (Ecore_Task_Cb)_ecore_con_client_timer, cl);
}