On Wed, Nov 06, 2002 at 06:10:04PM +0000, Alistair Phipps wrote:
> 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, 
I doubt it, it would have to be on the same interface...
> 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
> 

-- 
Matthew Toseland
toad at amphibian.dyndns.org
amphibian at users.sourceforge.net
Freenet/Coldstore open source hacker.
Employed full time by Freenet Project Inc. from 11/9/02 to 11/11/02.
http://freenetproject.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20021112/3dc0953f/attachment.pgp>

Reply via email to