[Twisted-Python] POP3 improvements

Abe Fettig abe at fettig.net
Tue Dec 31 09:18:57 EST 2002

On Tue, 2002-12-31 at 00:47, Christopher Armstrong wrote:

> On Tue, Dec 31, 2002 at 12:57:06PM +1100, Andrew Bennetts wrote:

> > It depends; if the event is in response to a request, e.g. LIST, it makes
> > sense to return a Deferred that will receive a list of available messages.
> > FTPClient works this way, and is very convenient -- an FTPClient user can
> > queue commands (like LIST, RETR, etc), and as the server responds, the
> > Deferreds will fire... and there's no confusion if you issue multiple LIST
> > commands in different directories, whereas a handle_LIST callback doesn't
> > have the same advantage.
> > 
> > In your case, I'd recommend Deferreds.
> > 

> So, as an _implementation_ strategy, the "handle_FOO" methods are
> great when the mapping of message-level request to message-level
> response is 1:many, and for interfaces, Deferreds are great.

Makes sense to me.  In this case I'll use Deferreds.


More information about the Twisted-Python mailing list