curl-library
RE: SO_REUSEADDR and multi-threaded environment
From: Yehezkel Horowitz <horowity_at_checkpoint.com>
Date: Wed, 2 Jul 2014 07:25:10 +0000
Date: Wed, 2 Jul 2014 07:25:10 +0000
> After a request, connection is closed by each thread. I see that a lot of ports are being left in TIME_WAIT state after running my application which I can understand.
Why the connection is closed after a request and by whom?
Did the server return "Connection: close" or send FIN/RST?
Did you set FORBID_REUSE option?
You can also try adding some more IP addresses to the server (DNS round-robin) and get a bigger range of IP:port.
HTH
Yehezkel Horowitz
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-02