On Wed, 6 Nov 2002 16:27:18 +0100
Oskar Sandberg <oskar at freenetproject.org> wrote:
> As far as I can tell, java does not provide a way to do this.
>
> The socket constructor only provides the option of bind()ing to a port
> if you also bind to a specific IP address, and we don't have that
> information.
public Socket(InetAddress address,
int port,
InetAddress localAddr,
int localPort)
Could localAddr not just be InetAddress.getLocalHost()? Alternatively,
perhaps InetAddress.getAllByName( "0.0.0.0" )[0] would work (using the
IPv4 wildcard address).
Binding to a specific local port would be very useful for me too, so I
can tighten up my firewall again and still use freenet.
- Alistair
_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl