in reply to Re^4: Sockets, autoflush, and TCP_NODELAY
in thread Sockets, autoflush, and TCP_NODELAY

As the transmit rate increases, the number of packets with more than one read from the scanner increases.

That sounds very much like Nagle is still operating. Are you sure that your setsockopt( TCP_NODELAY ) was successful? Try using getsockopt() after you've set it, to see what you get. Some stacks (MS for example) have this habit of responding success to unupported options.

Another possibility would be to set the SO_SNDBUF size to the same size as each write prior to writing. If your packets were fixed size you could just set it once, but with your max packet size 3 times the minimum, that probably wouldn't help.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."