lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Implementation of TCP_NODELAY


From: Ilya Lesokhin
Subject: [lwip-users] Implementation of TCP_NODELAY
Date: Wed, 14 Aug 2013 16:52:46 +0300

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]