Le 6/18/12 9:27 AM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) a écrit :
Hi,
As I understand, here is the flow :
1. acceptor.bind(portNumber) binds the server.
2. Client sends a message and is handled by an extension of
IoHandlerAdapter.
3. Client sends a heartbeat.
At 2 above, isn't the 'timer' started ?
Yes.
So that, at 3, when I do
getLastReadTime() I get the number of milliseconds elapsed between 2 and 3.
No, you get the current time. The method's name is pretty clear, it's
not getlastReadExlapsedTime, but getLastRead*Time*
Of course, there will be a finite time difference between 1 and 2.
I thought of posting the question here after the Debug perspective showed a
weird value for the number of milliseconds as reported by
getLastReadTime(). ;-)
It's a bit different than what you said in your first two mails.
So definitively, you can deduce the delay since you've received the last
heartbeat by computing the difference between it and the current time
you've got, assuming you store it in the session.
It may have been better to return the delay since the last read, or
since the session creation, true.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com