[Twisted-Python] UDP Factories

Justin Johnson justinjohnson at fastmail.fm
Sat Sep 20 23:04:01 EDT 2003


Thanks for the help.  This makes sense to me now.

-Justin

On Fri, 19 Sep 2003 22:21:21 -0400, "Itamar Shtull-Trauring"
<itamar at itamarst.org> said:
> 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. 
> > Sorry.
> > 
> > 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
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list