Hi, >>Isn't it what you expect ? No. I started the server, the client connects to it and within 5 seconds the heartbeat comes in. To handle the heartbeat, I wanted to know if the heartbeat came in within 5 seconds since the last read time (in this case, connect time). However, the last read time is appearing as a value in the order of 10^9 or so ! So, the comparison always fails.
That is why, I wanted to know, if the last read time was the *time duration* since the last read. Or, does it actually represent some time (ddmmyy... etc.) ? ನಾಗೇಶ್ On Mon, Jun 18, 2012 at 1:07 AM, Emmanuel Lécharny <[email protected]>wrote: > Le 6/17/12 7:39 PM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) a écrit : > > Hi, >> In my server implementation, I am handling a 'heartbeat' message from >> connected client every n number of seconds. If the message is not received >> in those n seconds, then the session has to be closed. Does >> getLastReadTime() method ( >> http://mina.apache.org/report/**trunk/apidocs/org/apache/mina/** >> core/session/IoSession.html#**getLastReadTime()<http://mina.apache.org/report/trunk/apidocs/org/apache/mina/core/session/IoSession.html#getLastReadTime%28%29> >> ) report the time in milliseconds from some other benchmark ? Because, it >> no way relates to the n number of seconds in which the heartbeat is >> expected to be received. >> > > Not sure I get what you mean. > > The getLastReadTime() method return the time (in ms) when the server has > received a message for the last time, or the last time some bytes have been > read. > > Isn't it what you expect ? > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com > >
