[Twisted-Python] UDP Factories

Itamar Shtull-Trauring itamar at itamarst.org
Fri Sep 19 11:03:20 EDT 2003

On Fri, 19 Sep 2003 05:42:08 -0600
"Justin Johnson" <justinjohnson at fastmail.fm> wrote:

> 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 currently...

You will notice the docs say nothing about factories. This is because
listenUDP does not accept factories :) If you want to keep track of
clients you will have to do it yourself by dispatching based on the
host/port of a received datagram.

Why are you using UDP, by the way?

Itamar Shtull-Trauring    http://itamarst.org/
Available for Python & Twisted consulting

More information about the Twisted-Python mailing list