<br><br><div><span class="gmail_quote">On 7/8/06, <b class="gmail_sendername">Alec Matusis</b> &lt;<a href="mailto:matusis@matusis.com">matusis@matusis.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt;You can have as many processes listening on a single MULTICAST UDP port as<br>you like.<br><br>Well, I am trying to run this example multicast UDP server:<br><br>from twisted.internet.protocol import DatagramProtocol<br>
from twisted.internet import reactor<br>from twisted.application.internet import MulticastServer<br><br>class MulticastServerUDP(DatagramProtocol):<br>&nbsp;&nbsp;&nbsp;&nbsp;def startProtocol(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print 'Started Listening'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Join a specific multicast group
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.transport.joinGroup('<a href="http://225.0.0.1">225.0.0.1</a>')<br><br>&nbsp;&nbsp;&nbsp;&nbsp;def datagramReceived(self, datagram, address):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.transport.write(&quot;data&quot;,address)<br><br>reactor.listenMulticast
(8005, MulticastServerUDP())<br>reactor.run()<br><br>when I try running more that one instance of this on the same machine I get<br><br>twisted.internet.error.CannotListenError: Couldn't listen on any:8005: (98,<br>'Address already in use').
<br><br>So my quiestion is how can I have multiple processes listening for multicast<br>on the same machine?<br><br>________________________________<br><br>quick google for &quot;udp twisted listen multiple&quot; reveals</blockquote>
<div><br><br><pre>def startListening(self):<br>        reactor.listenMulticast(5353, self, maxPacketSize=1024,<br>                                listenMultiple=True)<br><br></pre>&nbsp;</div><br></div><br>