Search code examples
pythondbusavahi

Creating a program to be broadcasted by avahi


I'm trying to write a program that outputs data that can be served over a network with avahi. The documentation I've looked at seems to say I have to register the service with dbus and then connect it to avahi, but the documentation to do this is pretty sparse. Does anyone know of good documentation for it? I've been looking at these:

python-dbus: http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html#exporting-objects

python-avahi: http://www.amk.ca/diary/2007/04/rough_notes_python_and_dbus.html

I'm really unfamiliar with how avahi works at all, so any pointers would be helpful.


Solution

  • Avahi is "just" a Client implementation of ZeroConfig which basically is a "Multicast based DNS" protocol. You can use Avahi to publish the availability of your "data" through end-points. The actual data must be retrieved through some other means but you would normally register an end-point that can be "invoked" through a method of your liking.