Community
Participate
Working Groups
Option TCP_NODELAY doesn't apply to all cases. In my environment, the network is slow, the ping delay is larger than 300ms. Host debugger tool always lost connection with tcf agent, sometimes even the initial connection can be established. Then I remove the TCP_NODELAY option, it will work well. Can you delete this code (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&i, sizeof(i))) from function create_channel?
What do you think about it ?
I found no proof that TCP_NODELAY can hurt reliability. The option must be used for connection to meet latency requirements.
Maybe you haven't come across a network that slow. We run a hypervisor system that has many virtual os, the network is slow. Can you add a macro to let vxworks don't set it ? #ifndef __VXWORKS__ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&i, sizeof(i)) < 0) { int error = errno; trace(LOG_ALWAYS, "Can't set TCP_NODELAY option on a socket: %s", errno_to_str(error)); errno = error; return NULL; } #endif
So, you saying it is vxWorks specific: vxWorks TCP/IP stack stops working in challenging network environment when TCP_NODELAY is set on a socket. Then you should file a bug report against vxWorks.
Thank you, I will try to delete TCP_NODELAY at code of vxworks.