[Twisted-Python] UDP Factories
justinjohnson at fastmail.fm
Fri Sep 19 07:42:08 EDT 2003
I have a UDP protocol that subclasses DatagramProtocol. It is working
fine, but I decided I wanted a protocol factory so I can keep track of
the list of clients. I added the following class, which doesn't nothing
protocol = MyProto
And then changed my reactor.listenUDP line to...
[justinj at chewie travis]$ ./udpserver.py
Traceback (most recent call last):
File "./udpserver.py", line 166, in ?
line 180, in listenUDP
p = udp.Port(port, protocol, interface, maxPacketSize, self)
line 66, in __init__
assert isinstance(proto, protocol.DatagramProtocol)
Any idea what I'm doing wrong? The examples showed a UDP factory, but I
don't quite see how this would work.
More information about the Twisted-Python