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]

Socket problems





I'm trying to get my C++ code working with the xPL network settings
(ListenOnAddress etc).

Everything works fine if I bind my socket to INADDR_ANY, but if I
use the local IP address (in my case 192.168.0.10), nothing is
received.

I've checked the network traffic with Ethereal, and xPLHal is
sending messages to 255.255.255.255 - my app just doesn't receive
them if it's not bound to INADDR_ANY.  According to various bits
I've been reading, sockets bound to specific addresses are not
supposed to receive broadcasts - it's only a deliberate "feature"
of
Windows sockets that lets this happen (so we'd have issues on other
platforms with this anyway).  But since I'm on Windows, and I'm sure
Microsoft won't have fixed their bug, it should work.

One other thing that puzzled me, was that Ethereal shows only
packets going to port 3865.  I would have expected to see copies of
those packets from the hub too, going to port 50000 (xPLHal Monitor)
and 50001 (my app).  I've checked that the hub is enabled in xPLHal
(and besides, it must be running or I wouldn't ever get any data -
INADDR_ANY or not).

Any ideas?

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

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.