Hundemeier / sacn

A simple ANSI E1.31 (aka sACN) module for python.
MIT License
47 stars 21 forks source link

Make multicast functional on Windows #42

Closed mthespian closed 1 year ago

mthespian commented 1 year ago

Windows uses socket.IPPROTO_IP for group membership functions. I haven't been able to test on other OSes but it appears likely this should work universally. Would need other test platforms to confirm.

Also shortened README.md line 151 comment to eliminate flake warnings

And added multicast leaves to the two examples that included joins, just to illustrate good practice.

Hundemeier commented 1 year ago

The option IPPROTO_IP seems to work on Windows and Linux. I tested with Windows 10 21H2 and Ubuntu 22.04.

I will try to write an integration test (based on the current example.py file), so that the GitHub Actions workflow is able to check the multicast behavior.

I will merge this pull request, but only publish a new version to pypi when I tried to write a new integration test.