Work on optimizing send(), to use fewer send function calls.

This commit is contained in:
Jan Vidar Krey
2009-06-21 14:21:34 +02:00
parent 7f24238ab5
commit ea3cd1bd90
4 changed files with 33 additions and 27 deletions

View File

@@ -23,8 +23,6 @@
/* FIXME: This should not be needed! */
extern struct hub_info* g_hub;
/* #define DEBUG_SENDQ 1 */
int net_user_send(void* ptr, const void* buf, size_t len)
{
struct user* user = (struct user*) ptr;
@@ -56,9 +54,7 @@ int net_user_recv(void* ptr, void* buf, size_t len)
{
struct user* user = (struct user*) ptr;
int ret = net_recv(user->net.sd, buf, len, 0);
/*
hub_log(log_trace, "net_user_recv: sd=%d, len=%d/%d", user->net.sd, ret, (int) len);
*/
if (ret > 0)
{
user->net.tm_last_read = time(NULL);