[Twisted-Python] UDP Factories
itamar at itamarst.org
Fri Sep 19 22:21:21 EDT 2003
On Fri, 19 Sep 2003 16:18:32 -0600
"Justin Johnson" <justinjohnson at fastmail.fm> wrote:
> Yeah I sent this email out real quick without looking at the doc.
> I'm using UDP because the device I'm coding for uses UDP. Twisted
> sure saved me a ton of time.
> Out of curiosity, why doesn't listenUDP accept Factories?
This would, to be a general purpose thing, need to create a protocol per
datagram. This would be... inefficient. In TCP you have a protocol per
connection. In UDP there are no connections. You might build one on top
of UDP, in which case you would have a protocol-ish object you dispatch
to, but how you determine this object and its lifecycle would be
something you would have to determine.
Itamar Shtull-Trauring http://itamarst.org/
Available for Python & Twisted consulting
More information about the Twisted-Python