Odd TCP Behavior
I have a TCP connection from a Linux server that is acting weird, unexpected. Basically it seems to be waiting for an ACK from the client before continuing the stream, maybe like it's in congestion control algorithm. But nothing leads me to believe it should be avoiding congestion, there were no TCP Retransmissions. Below is my wireshark capture (modified a little to protect the innocent). Maybe I just don't have enough of an understanding of how TCP works, but I will explain what I am thinking as I go along.
I don't know if this will help, but my response to the command is 10 different socket writes each 1072 in length. I've seen it on the 2.6.17 and the 2.6.15 kernels. I appreciate anyones help and understanding with this.
Ok, maybe I wasn't actually turning off Nagle. I turned off Nagle with another command and it seems to work as expected. Can anyone tell me the difference between:
old way: setsockopt(respsock, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof(flag));
new way: setsockopt(respsock, SOL_TCP, TCP_NODELAY, (char*) &flag, sizeof(flag));
I can't seem to find the difference between IPPROTO_TCP and SOL_TCP as levels in the setsockopt function. Both values are defined on my machine.
|All times are GMT -5. The time now is 06:33 AM.|