Keep alive with Ping Pong

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Keep alive with Ping Pong

LongkerDandy
Hi

I have a grizzly based TCP Server.
And I want to implement a keep alive mechanism, which detects broken network connection.
Basicaly, clients will send Ping and server will respond Pong.
If server doesn't receive Ping in 60 seconds, consider the connection is lost.

Any hint/example how to implement this in grizzly?

Thanks
LongkerDandy
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive with Ping Pong

Johan Maasing
It sounds like the ActivityCheckFilter is what you should add to your filter chain.


2014-10-10 7:47 GMT+02:00 LongkerDandy <[hidden email]>:
Hi

I have a grizzly based TCP Server.
And I want to implement a keep alive mechanism, which detects broken network connection.
Basicaly, clients will send Ping and server will respond Pong.
If server doesn't receive Ping in 60 seconds, consider the connection is lost.

Any hint/example how to implement this in grizzly?

Thanks
LongkerDandy