forked from enlightenment/efl
ecore_con: use send() instead of write() for portability.
This commit is contained in:
parent
8873bfeb2b
commit
c77c0107a2
|
@ -2463,11 +2463,7 @@ _ecore_con_server_flush(Ecore_Con_Server *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svr->ecs_state || (!(svr->type & ECORE_CON_SSL)))
|
if (svr->ecs_state || (!(svr->type & ECORE_CON_SSL)))
|
||||||
#ifdef _WIN32
|
|
||||||
count = send(svr->fd, (const char *)buf + *buf_offset, num, 0);
|
count = send(svr->fd, (const char *)buf + *buf_offset, num, 0);
|
||||||
#else
|
|
||||||
count = write(svr->fd, buf + *buf_offset, num);
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
count = ecore_con_ssl_server_write(obj, buf + *buf_offset, num);
|
count = ecore_con_ssl_server_write(obj, buf + *buf_offset, num);
|
||||||
|
|
||||||
|
@ -2581,7 +2577,7 @@ _ecore_con_client_flush(Ecore_Con_Client *obj)
|
||||||
if (num <= 0) return;
|
if (num <= 0) return;
|
||||||
Ecore_Con_Server_Data *host_server = eo_data_scope_get(cl->host_server, ECORE_CON_SERVER_CLASS);
|
Ecore_Con_Server_Data *host_server = eo_data_scope_get(cl->host_server, ECORE_CON_SERVER_CLASS);
|
||||||
if (!(host_server->type & ECORE_CON_SSL) && (!cl->upgrade))
|
if (!(host_server->type & ECORE_CON_SSL) && (!cl->upgrade))
|
||||||
count = write(cl->fd, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num);
|
count = send(cl->fd, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num, 0);
|
||||||
else
|
else
|
||||||
count = ecore_con_ssl_client_write(obj, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num);
|
count = ecore_con_ssl_client_write(obj, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue