|
From: | Bill Auerbach |
Subject: | Re: [lwip-users] Implementation of TCP_NODELAY |
Date: | Wed, 14 Aug 2013 16:37:00 -0400 |
Hi, Because lwip_getsockopt_internal takes care of this. lwip_getsockopt is simply an error checker before doing the real work in lwip_getsockopt_internal. Bill From: address@hidden [mailto:address@hidden On Behalf Of Ilya Lesokhin Hi, Looking at the code of lwip_getsockopt(...) ... switch (optname) { case TCP_NODELAY: case TCP_KEEPALIVE: #if LWIP_TCP_KEEPALIVE case TCP_KEEPIDLE: case TCP_KEEPINTVL: case TCP_KEEPCNT: #endif /* LWIP_TCP_KEEPALIVE */ break; ... I case see that the option TCP_NODELAY does nothing. If I understand correctly this functionality is implemented and controlled by the flag- TF_NODELAY. So I was wondering, is there a reason the code int there isn't: ... case TCP_NODELAY: if ((*(int*)optval)) sock->conn->pcb.tcp-> flags |= TF_NODELAY; else sock->conn->pcb.tcp-> flags &= ~TF_NODELAY; break; ... or something along those lines? Thanks, ilya |
[Prev in Thread] | Current Thread | [Next in Thread] |