[Twisted-Python] multicast multi-listen not working or just not working on OSX?
I am having a hard time getting multicast to work in Twisted. Code snippets/examples I have found are either too old or just incorrect. what is the correct way to write a protocol handler that will multilisten on a multicast socket? I am trying to add mDNS responder functionality to my application and twisted complains that port 5353 is already in use. I know I can run multiple copies of mDNSResponder from Apple, is this just a problem with twisted on OSX or is it worse than that. regardless is there a fix to get twisted to work, this application will eventually be deployed in an linux or solaris environment so if it is an OSX thing I can just find another box to test it on.
On Thu, 2005-03-10 at 11:12 -0500, jarrod roberson wrote:
what is the correct way to write a protocol handler that will multilisten on a multicast socket?
In Twisted 2.0 there's a flag to listenMulticast that lets you do this. Also look in my sandbox for some prelim zeroconf code (enough to be able to read info, not good enough to publish).
regardless is there a fix to get twisted to work, this application will eventually be deployed in an linux or solaris environment so if it is an OSX thing I can just find another box to test it on.
On Linux there seems to be a movement to standardize on the howl mdnsresponder, but that'll take a while. Probably you want your mdns library to use system version if available, otherwise its own.
On Thu, 10 Mar 2005 11:43:56 -0500, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
On Thu, 2005-03-10 at 11:12 -0500, jarrod roberson wrote:
what is the correct way to write a protocol handler that will multilisten on a multicast socket?
In Twisted 2.0 there's a flag to listenMulticast that lets you do this. Also look in my sandbox for some prelim zeroconf code (enough to be able to read info, not good enough to publish).
what I am trying to get done first is a responder for my application to reply to queries / publish I got the lastest version of Twisted from subversion ( 13109 ) and installed it by doing a python setup.py all install now I get this error on all my code ( and the mdns.py code from your sandbox ) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ from twisted.internet import protocol File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/twisted/internet/protocol.py", line 18, in ? from zope.interface import implements ImportError: No module named zope.interface +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ is there a dependancy on Zope with Twisted 2.x? I did find the protocol.py file the line from zope.interface import implements what am I missing here?
On Thu, 2005-03-10 at 14:14 -0500, jarrod roberson wrote:
is there a dependancy on Zope with Twisted 2.x?
There's a dependency on zope.interface in 2.0: http://www.zope.org/Products/ZopeInterface/
On Thu, 10 Mar 2005 14:57:01 -0500, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
On Thu, 2005-03-10 at 14:14 -0500, jarrod roberson wrote:
is there a dependancy on Zope with Twisted 2.x?
There's a dependency on zope.interface in 2.0: http://www.zope.org/Products/ZopeInterface/
ok you only need the zope.interface product and not the entire zope server, that is better I got zope.interface installed and everything is working but I am getting lots of exceptions related to unicode and what not.
On Thu, 2005-03-10 at 16:19 -0500, jarrod roberson wrote:
I got zope.interface installed and everything is working but I am getting lots of exceptions related to unicode and what not.
There's a reason it's in the sandbox.
On Thu, 10 Mar 2005 16:51:19 -0500, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
On Thu, 2005-03-10 at 16:19 -0500, jarrod roberson wrote:
I got zope.interface installed and everything is working but I am getting lots of exceptions related to unicode and what not.
There's a reason it's in the sandbox.
:-) Thanks for the help, I have a basic twisted mDNSListener working now in very few lines of code. When I get the mDNSResponder finished I will post that back to community. Maybe it might even make it into twisted proper :-) When I get it a little more full features I will post links to my code for other peoples use.
Itamar Shtull-Trauring wrote:
On Linux there seems to be a movement to standardize on the howl mdnsresponder, but that'll take a while. Probably you want your mdns library to use system version if available, otherwise its own.
ITYM http://www.freedesktop.org/Software/Avahi, HTH, HAND.
participants (3)
-
Itamar Shtull-Trauring
-
jarrod roberson
-
Tommi Virtanen