users@grizzly.java.net

Re: 1.7.3.3 drop connection every 30 seconds

From: Sebastian Pavel <sebastian.pavel_at_gmail.com>
Date: Sat, 7 Jun 2008 13:44:13 -0700 (PDT)

Yes it helps a lot. Thanks.

This was my first touch with Grizzly. I am considering building a
client-server appplication on top of Grizzly but as the documentation lacks
it is very difficult to understand how it really works.

Thanks again.


John ROM wrote:
>
> Hi,
> in grizzly the default on an idle connection is set to 30 seconds.
>
> if you need longer connections you need to have code like this ,of course
> on both sides
> client and on server
>
> TCPSelectorHandler tcpSelectorHandler = new TCPSelectorHandler();
>
> DefaultSelectionKeyHandler keyHandler = new DefaultSelectionKeyHandler();
> //keep connection for example for 30 minutes or whatever you need
> keyHandler.setTimeout(30 * 1000 * 60);
> tcpSelectorHandler.setSelectionKeyHandler(keyHandler);
> controller.addSelectorHandler(selectorHandler);
>
> does this help?
>
> Greetings john
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/1.7.3.3-drop-connection-every-30-seconds-tp17674241p17712930.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.