The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Re: xPL Lib - updates




It dawns on me why you guys keep talking about that loopback address :-)

What you want is to start listening on 127.0.0.1 and only pick up
things sent to 127.0.0.1, in fact ignoring any real ip addresses that
may exist.

Aha...

But if you send something to 127.0.0.1, then another local IP also
picks this up.  That's how it currently works: hub broadcasts to the
loopback, but xPL listens to a specific address (my version thereof).

Wouldn't then -following the same logic- listening on 127.0.0.1 (if it
were possible) receive all incoming traffic for any ip ?

I admit knowing near to nothing about the how and what of loopback.  I
am curious though.

Tom


On Sat, 13 Nov 2004 20:29:23 -0000, Mal Lansell <mlansell@xxxxxxx>
wrote:
>
> --- In ukha_xpl@xxxxxxx, "John B"
<home-automation@j...>
> wrote:
> > Hi Tom,
>
>
> >
> > > >
> > > > If xpllib is running as a hub client (i.e. has bound to
port
> 50,000+, it
> > > > should only *ever* listen on the loopback address -
this ties
> in with the
> > > > hub which should only ever broadcast to the loopback
address.
> > >
> > > Ah, but it doesn't listen on the loopback address (which is
> impossible
> > > btw), it listens on IPAddress.Any
> >
> > Ah - I think you've uncovered a bit of a bug here... it should
not
> be listening on IPAddress.Any - it should be listening on the
> loopback address only (unless it's bound directly to port 3865 of
> course).
> >
> > Why is it impossible to listen on the loopback address
> (IPAddress.Loopback)?
> > Surely the loopback interface is treated the same as any other IP
> interface?
> >
> > > <code_snippet>
> > >     While Portnum < XPL_BASE_DYNAMIC_PORT + 512 And Not
Portnum =
> 0
> > >       Try
> > >         sockIncoming.Bind(New IPEndPoint(IPAddress.Any,
Portnum))
> > >         XPL_Portnum = Portnum
> > > </code_snippet>
> >
> > Yep, definately a bug :-)
> >
>
> When I did my C++ code, it wouldn't work unless I used INADDR_ANY,
> rather than the local IP.  I asked about it at the time - your
> suggestion of binding to _ANY solved the problem (although I don't
> pretend to know enough about sockets to know why).
>
> Mal
>
>
>
>
>
>
>
>
>
> xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
> http://www.xpl.myby.co.uk
> To Post a Message: ukha_xpl@xxxxxxx
> To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
>
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/ukha_xpl/
>
> To unsubscribe from this group, send an email to:
> ukha_xpl-unsubscribe@xxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.