yOn Thu, 15 Dec 2005, Zubin Dittia wrote:
Thanks for the input! That was very helpful. Can I get around total
outgoing connections limit by making the application bind to the same
local port for different connections that have as their destination
different servers?
Yes, if you use SO_REUSEADDR.
You can also have multiple IP addresses and have the application rotate
among them, allowing for up to "nr_of_local_ips * size_of_portrange"
outgoing connections per destination_ip:port.
Only problem is that the application must keep track of which ports are in
use. If you get a full tuple collision with an existing connection connect
will return EADDRINUSE however, so it's not very hard to have automatic
recovery procedures should you guess wrongly in the application.
Regards
Henrik
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html