mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atul Moglewar <atulmogle...@gmail.com>
Subject Re: IoSession asynchronous write via Http
Date Thu, 05 Mar 2009 05:56:29 GMT
 acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );

Where accptor is of type NioSocketAcceptor.

Thanks,
Atul

On Thu, Mar 5, 2009 at 11:19 AM, Adi <adinkale@gmail.com> wrote:

> 2009/3/5 Ashish <paliwalashish@gmail.com>
>
> > On Thu, Mar 5, 2009 at 4:48 AM, Adi <adinkale@gmail.com> 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?
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message