Hi, I also realized that the IoSession ifc, has a method isConnected(), this returns if the current session is connected to a remote peer. This is pretty useful and helpful.
Thank you for all your pointers, -Uday -----Original Message----- From: Vinod Panicker [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 10:37 AM To: dev@mina.apache.org Subject: Re: Checking if connectionb is alive. On 4/24/07, Uday Prakash (DHL CZ) <[EMAIL PROTECTED]> wrote: > Hi, > > I was looking thru some documentation online and realized that there is > no standard way [well, at least I didn't find any, may be I didn't look > hard enough or in the right place] to check if a tcp/ip connection is > alive between the server and client. > > The reason I am posting is, to figure out if there is a clean way, from > the out side or inside the server to check if the connection is alive > between the server and client. This is so that I can have an indicator > on the gui representing the status of the connection. > > Could anyone please direct me on this? > > BTW: The Server I built on MINA performed beyond expectations, it was > needed to have a turnaround time of 70ms for message processing and > reply, I was able to get it done in 15ms!!! Unfortunately, there's no reliable way of checking if a connection is actually alive. A standard practice is to send keep-alive packets (implemented in your protocol) to ensure that the connection is kept alive and working. HTH, Vinod.