[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: xPL Lib - updates
--- 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 Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|