I am using SSDPClient and BlueSocket for discovery of some NAS devices.
Now, I found that with the stock code, I get responses only on the default interface, but not on additional interfaces with their own subnets. I have a NAS on each subnet, and when I make either interface the default, then the device on that subnet responds, but I do not receive the response from the other.
I suspect that BlueSocket only listens or broadcasts (multicasts) on the default interface. But I cannot figure out how to change that, because there's no mentioning of interfaces in the source code, and I'm not familiar enough with the BSD socket design to find how to fix the code for that.
I suspect that I need to iterate over all the interfaces, get their IPs addresses and then have the SSDPDiscovery code listen or write on each of these, to get all the responses. How do I accomplish that?
The BlueSocket code calls the interface address a "node". It's a parameter on the
listen()function.To listen on an alternative interface, pass its local IP address as the
node:argument, like this: