<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Exarkun,<br>
<br>
Ah, that should work correctly and as catered in the framework. <br>
<br>
<br>
Btw, for imap4.py i have a suggestion to improve&nbsp; the performance in
fetch :<br>
<br>
Fetch can be an expensive operation if the number of messages is a lot,
this can be more "reactor" friendly if we use "fetch"<br>
as a generator.<br>
<br>
def fetch(self, messages, uid):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; yield xxxx<br>
<br>
Then imap4.py needs to update the __cbManualSearch to use this instead
of "reactor.callLater( .....result[5:], tag..)" (see attached).<br>
<br>
<br>
<br>
Marcus.<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a> wrote:
<blockquote
 cite="mid:20101017142810.2414.2079664616.divmod.xquotient.500@localhost.localdomain"
 type="cite">
  <pre wrap="">On 16 Oct, 02:02 pm, <a class="moz-txt-link-abbreviated" href="mailto:marcus@internetnowasp.net">marcus@internetnowasp.net</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

This might seems like a trivial question or at least i would have
thought so but it has eluded me for some time on how to do this 
elegantly.
In twisted mail, since the only part where we instantiate an instance 
of
account  is under :

  def requestAvatar(self, avatarId, mind, *interfaces):
       account = xxinterface() # instantiate our account

How do i find out if a particular connection is already dead in the
given "account" class? For smtp for example,
"mind" is None and avatarId is just the id of the login user. Even if
this is pop3 or imap, the same problem arise
how do i know if the connection of the particular "Server" instance is
dead.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Perhaps you want to do something with the logout callback that 
requestAvatar is also responsible for returning?  The SMTP protocol 
implementation will call it when the connection is lost.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a>
<a class="moz-txt-link-freetext" href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a>

  </pre>
</blockquote>
<br>
</body>
</html>