When you enter the time wait, you can't rebind again, since the socketopt is defined after bind. By moving it up before the bind, you client sock will still enter the TIME_WAIT after closing the fb, but you can rebind.
No comment to linger , we can keep ot on zero lengtj Chet Ramey <chet.ra...@case.edu> schrieb am Fr., 7. Jan. 2022, 16:49: > On 1/7/22 6:01 AM, Dzogovic Vehbo wrote: > > Hello, > > > > Could we apply this patch to examples/loadables/accept.c ? > > https://github.com/dzove855/Bash-web-server/blob/main/accept.patch > > > > This will alow rebinding on the port instead of failing linked to the > > TIME_WAIT state. > > Why would you want to defeat TIME_WAIT? If you're specifying the port, you > want TIME_WAIT to work so you don't end up mixing connection state, right? > We should want to keep a zero-length linger interval as well. > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ >