geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajith Attapattu" <rajith.attapa...@redknee.com>
Subject RE: IMAP Implementation
Date Mon, 12 Dec 2005 17:02:02 GMT
>I had a strange problem with some of the IMAP commands. When I read
from
>the  InputStream after reading the last line from the response, program
>just hangs. I'm creating a BufferedReader from the socket input stream.

I had the same problem.
That's bcos the read method will be blocking until the data is
available(unless there is connection error or timeout) and the code will
block giving the impression the program has hanged.

So what you should do is once you read the last line (there should be
characters indicating end of response, for instance .CRLF for POP3) you
should exit the loop without doing another read()(or else it will
block).

That way you know it's the end of response and proceed with the rest of
the logic.

Hope this helps 

Regards,

Rajith Attapattu.

-----Original Message-----
From: Bilal Bhatti [mailto:bilal@neelo.com] 
Sent: Monday, December 12, 2005 11:47 AM
To: dev@geronimo.apache.org
Subject: RE: IMAP Implementation

I'm not sure if I'm working on it alone but I am working on it. I didn't
hear anything specific from Bruce as to how I can help. I assumed he is
the lead on the IMAP implementation. I have some basic functionality
implemented.. login/fetch folders etc.

Any help would be appreciated.

I had a strange problem with some of the IMAP commands. When I read from
the  InputStream after reading the last line from the response, program
just hangs. I'm creating a BufferedReader from the socket input stream.
I'm not sure if i need to reset the stream in some cases. Any thoughts?
I
can post the code later on.

Bilal

>
> How is the IMAP implementation going?? I guess Bilal is working on it.
>
> I have some free time next week and I can help after cleaning up the
> POP3 stuff.
>
> Let me know.
>
> Regards,
>
> Rajith
>


-- bilal

-----
"We act as though comfort and luxury were the chief requirements of
life,
when all that we need to make us happy is something to be enthusiastic
about." - Einstein


Mime
View raw message