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
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to