I want to be able to tune TCP in different ways, how can I do this?
My problem is following, when sending data to a socket and the link
get down, the send function hangs (fills its send buffer) and waits for the
link to get up again. This "up link"-wait takes around 1 minute after the
ethernet interface infact has got connected again (checked with ping),
can I, in some way, tune my TCP socket so this time will become minimal?
To test this, I start my application, start sending data and disconnect the
ethernet cable, the send function hangs (as it should) and are waiting on
the link to get up again, when I put the cable back it will take around one
minute before the send will release the send-hang. What should I do to get
rid of that minute delay?
I have tried using the setsockopt-function to decrease the SNDBUF size
to MTU size (1500 bytes) to get the send to go faster.
Also disabled the Nagle algorithm in the both ends of the link.
Are there any ways to adjust the slowstart, sendstall, congestion, etc. for
tuning the TCP protocol?
I'm running red hat 7.3 and developing in c.
Thanks in advance.