I strongly suggest that you buy a copy of the book "Internet Email Protocols: A Developer's Guide", by Kevin Johnson, published by Addison Wesley, ISBN 0-201-43288-9.

Your questions indicate a very basic misunderstanding of the IMAP protocol. Until that misunderstanding is clarified, you are going to have a very long and frustrating experience.

On Thu, 28 Oct 2004 [EMAIL PROTECTED] wrote:
What I really want is to make
sure that after log-ed in until logout, it is counted as in one connection.

It's one connection from the point that the initial TCP interchange is made (even before authenticated).


If this is true, then after login until logout there can only be one  mailbox
being selected (one session there).

There can only be one mailbox selected at a time. If you select mailbox2
while mailbox1 is selected, then mailbox1 is automatically unselected and mailbox2 is now selected. This forms a new session within the same connection.


"can have multiple MAILSTREAMs  open, each with a separate mailbox selected",
I believe you mean   the mail boxes for the MAILSTREAMs might be SELECT'ed
before and not  closed, but only one is SELECT'ed at the moment.

No. I mean that you can have multiple connections, each with a different mailbox SELECTed. This is the only way that you can have more than one mailbox SELECTed at a time.


Also if the MAILSTREAM s1's mail  box had been SELECT'ed before but now
another mail box is SELECT'ed. Could we  still call this MAILSTREAM s1 open until
it is closed?

Any existing MAILSTREAM is not affected by opening a new MAILSTREAM. Each MAILSTREAM is completely independent of any other MAILSTREAMs.


By passing a non-null MAILSTREAM to mail_open(), you can do a new SELECT on a MAILSTREAM, without closing the connection.

Will the data  downloaded into cache while it was open be still
in the c-client cache, until s1  is closed even if other mail box is SELECT'ed
now (i.e. can still use some of  the mail_xxx() function against this stream
s1, such as get msg  number..)?

Each MAILSTREAM has its own cache. The cache is destroyed when the MAILSTREAM is closed, or if the MAILSTREAM is passed to mail_open() to SELECT a new mailbox.


-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to