On Tue, 24 Jun 2003, Gangadhar Mylapuram wrote:
> Server will send several number of lines of response to client. what
> size of the buffer i have to consider to receive the response. Please
> can anybody tell me the size of the buffer?

There is no such thing.  The IMAP server can send an unlimited number of
lines, and the length of the line can be unlimited.  As a practical
matter, it's limited only by the total amount of data in the mailbox.

It is extremely ill-advised to try to buffer multiple lines of response
from the server.  Such a strategy will never work well in IMAP.  A client
can not assume that it only gets responses for the current command.  It
can get responses for other reasons.

Rather, you should maintain a model of the mailbox in the client's memory.
Process responses from the server one line at a time; each line can be
handled discretely.  For each response line, update the client's model of
the mailbox, and then discard the response line from memory.  Then, and
only then, read the next response line.

-- 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