On 09.07.2004 15:41, Darin Fisher wrote:

> Hmm... a nsIInputStreamPump should automatically push all of the data
> to you. That's just what it does. Perhaps it is the case that there
> is a PLEvent in the queue that will call your OnDataAvailable? In
> other words, if you were to wait a little while, perhaps you would
> get your last OnDataAvailable event?

I'm not good in this area, I just backtraced from where
ProcessProtocolState() is called.
Maybe it's the protocol handlers fault, but our ReadNextLine() only
reads data from the InputStream if no whole line (ends with \n) is in
its own buffer. And this buffer is only filled with as much bytes as are
free in the buffer.

In the normal case it shouldn't happen, but it's possible that not all
or none bytes aren't consumend on ODA.

> Are the remaining bytes predictable?  Are they part of the POP3 protocol,
> or are they just a few random bytes?

Yes and no. Some servers send two replies in case of error. Since the
RFC only defines and we only expect one, the remaining would stay in the
buffer until read and mistakenly interpreted as reply to our next command.

> Can you modify the POP3 stream listener to read to the last byte of data
> before it processes the data?

So to read as much bytes Available() returns when ODA is called? I'm not
even sure if OnDataAvailable() always calls ReadNextLine().

Christian
_______________________________________________
Mozilla-netlib mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to