On Wed, Nov 06, 2002 at 06:10:04PM +0000, Alistair Phipps wrote: > On Wed, 6 Nov 2002 16:27:18 +0100 > Oskar Sandberg <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl >
-- Matthew Toseland [EMAIL PROTECTED] [EMAIL PROTECTED] Freenet/Coldstore open source hacker. Employed full time by Freenet Project Inc. from 11/9/02 to 11/11/02. http://freenetproject.org/
msg05361/pgp00000.pgp
Description: PGP signature
