Re: [Twisted-Python] UDP question

On 7/8/06, Alec Matusis <matusis@matusis.com> wrote:
You can have as many processes listening on a single MULTICAST UDP port as you like.
Well, I am trying to run this example multicast UDP server:
from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor from twisted.application.internet import MulticastServer
class MulticastServerUDP(DatagramProtocol): def startProtocol(self): print 'Started Listening' # Join a specific multicast group self.transport.joinGroup('225.0.0.1')
def datagramReceived(self, datagram, address): self.transport.write("data",address)
reactor.listenMulticast(8005, MulticastServerUDP()) reactor.run()
when I try running more that one instance of this on the same machine I get
twisted.internet.error.CannotListenError: Couldn't listen on any:8005: (98, 'Address already in use').
So my quiestion is how can I have multiple processes listening for multicast on the same machine?
________________________________
quick google for "udp twisted listen multiple" reveals
def startListening(self): reactor.listenMulticast(5353, self, maxPacketSize=1024, listenMultiple=True)
participants (1)
-
jarrod roberson