[Twisted-Python] Twisted UDP & makeConnection

Jp Calderone exarkun at divmod.com
Sat Sep 3 17:25:31 EDT 2005

On Sat, 3 Sep 2005 14:17:07 -0500, James Saker <jamessaker at firepole.com> wrote:
>Got a bit of a puzzle trying to make a minimal syslog relay out of twisted and
>am wondering if it's due to an incompatibility between ServerFactory and
>Twisted's UDP, or if I'm simply missing something obvious.

Twisted's UDP support doesn't use factories.  Since UDP isn't connection oriented, there's little or no reason to construct new protocol instances to handle traffic: one instance is used to handle all traffic received by a port for its entire lifetime.  Try passing a DatagramProtocol subclass instance in to UDPServer, instead of a ServerFactory; you should see this problem disappear.


More information about the Twisted-Python mailing list