[Q] Linux and localAddress

Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Mon Oct 29 20:21:23 UTC 2007




El 10/29/07 4:38 PM, "Hans-Martin Mosner" <hmm at heeg.de> escribió:

> When you execute
> "(Socket newTCP connectToHostNamed: 'squeak.org' port: 80) localAddress"
> you get the address of the interface which can be used to connect to
> squeak.org.
> So if your machine is connected to two local networks 192.168.1.x and
> 192.168.2.x you get back the address of the interface that is connected
> to the internet (via some router/NAT gateway or whatever).
> Of course, you should substitute some other address for squeak.org if
> your network is not connected to the internet.
> And if you're not a messie, you should clean up after yourself by
> closing the open socket :-)
> 
> Cheers,
> Hans-Martin

Thanks, is just what I discover , but better, as I don't need others
machines on my lan, only trusted web connected machine.

Edgar





More information about the Squeak-dev mailing list