|Don't ask to ask, just ask|
What OS are you using?
It looks like all linux kernels since 2.6.32 has implemented TCP_USER_TIMEOUT; which would definitely be the better option if it is available to you.
This is something I have long done.
Hm. Makes me wonder why you are asking here, if you already have a solution?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.