[Q] Linux and localAddress

Gary Chambers gazzaguru2 at btinternet.com
Wed Oct 31 22:44:10 UTC 2007


Wouldn't it be nice to be able to enumerate the actual interfaces though...
and route things to a particular one. We generally have to disable net.eth0
to allow gprs connections... and then manage multiple modems manually.

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of Edgar
> J. De Cleene
> Sent: 29 October 2007 8:21 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [Q] Linux and localAddress
>
>
>
>
>
> 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