cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Threaded resolver spins bug + patch

From: Jamie Lokier <jamie_at_shareable.org>
Date: Sun, 9 Aug 2009 06:51:20 +0100

Constantine Sapuntzakis wrote:
>
> That's a good idea but I have a couple concerns that maybe you can
> address.
> I'm thinking that allocating a random TCP port might lead to random
> failures of future programs as they are unable to allocate the port
> they need to listen on. Especially because Windows uses ports
> 1025-5000 as its default ports.

That makes sense. You can give a port number instead, starting from
65535 down if you prefer, until one of them binds successfully. You
might find that closing the listening socket after the connect frees
up the port, too.

I'm not sure if Windows allows you to bind to 127.0.0.2 and then
connect to it, which would be another trick.

> Also, would any aggressive firewalls block or pop up messages to users
> if a TCP were used?

I don't know. Because it's an internal connection within the machine
that's less likely, but firewalls can do anything.

-- Jamie
Received on 2009-08-09