-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Works on cPython too ? #1
Comments
Hi @sander76. Yes, this code allows others to find your IP address using mDNS. It absolutely can be made to work on cPython (and that's how I did most of my initial testing). The changes that are needed mostly are in the That said, there are other projects for pure Python mDNS implementations which do not have small size as a primary goal. You should take a look at the standard Python ZeroConf library. This supports everything that my code does and a great deal more, at the expense of a much, much larger memory footprint, the need for threads and some rather less efficient packet handling. You can advertise your IP address (and other services) using the I hope that this helps. |
@nickovs Thanks for the detailled response. The thing with ZeroConf library is that it requires NetIfaces. This is a library that cannot be just pip installed on windows: You need to compile it yourself or use a precompiled binary from https://www.lfd.uci.edu/~gohlke/pythonlibs/ As I am targeting windows users that is not a procedure I prefer. |
Just linking this here for anyone that may want to try get slimDNS to work on their dev machine: https://gist.github.com/aaroncohen/4630685 I failed to get slimDNS running in Python 3.6 in Windows, and I couldn't afford the development time to investigate it further. I too suspect there is a missing socket option or the like that is required. |
If there is interest then I could certainly look at creating a version that is designed to work on other platforms. There seem to be three areas necessary to make this happen:
For the last item I can test on macOS and Linux but I'd need someone else to test the Windows version. If people want to run slimDNS on full-size Python then click the smiley on this comment. If I get enough smiles I'll do it! |
If I understand correctly this code allows for getting the ip address of devices which are registered on mDNS with a certain name ?
If so I wonder whether this library can be adapted to work on "normal" python too (and more specifically on windows..) ? I did give it a go myself, but I failed..
I know there are libraries out there doing this already, but they are hard to install or are non-windows.
The text was updated successfully, but these errors were encountered: