2009/3/5 Ashish <[email protected]>

> On Thu, Mar 5, 2009 at 4:48 AM, Adi <[email protected]> wrote:
> > Hi,
> > I am new to Mina, and I have a question:
> > I have written an HttpServer with decoder and encoder to received
> > messages. I have some data I need to read when message arrives, and
> > send it back to the client. I have a thread that reads the data and
> > writes it into the output stream.
> > This works ok, but I do not know how to handle session closure once I
> > finish writing.
>
> Why do u need to close the session? If its MINA session, it shall
> expire based on the
> timeout specified.

   Sounds good. How do I specify the session timeout?

>
>
> > How do I properly close the connection after all data has been written
> > without interferring with the background task's action on the one hand
> > (e.g. session.close()), and not hanging too long on the other hand?
>
> session.close() can be called to force terminate a session, but in
> your scenario don't understand
> why explicitly server shall close the session?
>

Reply via email to