Ooookay, so, a brief synopsis:
I have a plugin I’m working on:
Ignore the “Plex” in the name, I’m aware that’s a no-no.
So this plugin utilizes the pychromecast library, which utilizes the zeroconf python library:
The zeroconf library requires precompiled, OS-specific C-libraries, so I forked it and rewrote it to NOT need that:
So, in a nutshell, the plugin relies on pychromecast, which relies on zeroconf, which uses sockets to send and recieve UDP data on port 5353 (multicast).
Now, with all of this said…the plugin works perfectly on Linux. It’s fairly quick, it gets all of my cast devices reliably, great.
However, on Windows…it doesn’t get any responses back. I recall a similar issue with sockets/mdns between Linux and Windows, and that being fixable by setting the socket flag SO_REUSEADDR a specific way, but it doesn’t fix it in this case.
Additionally, I have taken my modified zeroconf.py file and ensured that it does in fact work in python 2.7 console on the exact same OS, so I’ve ruled out my fixes as being a culprit.
When I wireshark the connections, I see the outgoing request all the time. What’s interesting, however, is that if I look in resource manager between the Plex and Python instances of the request, I’m seeing that Python is listening on 192.168.1.120, whereas PlexScriptHost is listening on IPv4 loopback or IPv4 unspecified.
Even if I set the interface to manually use 192.168.1.120 in zeroconf.py, it doesn’t appear to be binding directly to that interface.
I know this is some pretty low-level stuff, but if I can’t get it to work on Windoze, it’s virtually useless. Anybody have any experience with this?
