Hi, >>So the thing is that there is no read if the client just connect and does not send anything before the heartbeat. But, the connect is happening once the client has sent a connect message (containing, for example, id and password). This message is handled in a handler. Isn't this connect counted as a read after the session is created (i.e. the server is bound as acceptor.bind(portNumber)) ?
>>Maybe we should initialize it to the time of the session creation ? You mean, initially, getCreationTime() and getlastReadTime() report the same. But, as the session progresses, getlastReadTime() is reset accordingly ? N. On Mon, Jun 18, 2012 at 11:13 AM, Emmanuel Lécharny <[email protected]>wrote: > Le 6/18/12 6:00 AM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) a écrit : > >> 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.) ? >> > So the thing is that there is no read if the client just connect and does > not send anything before the heartbeat. > > The counter is initialized to 0 when the session is created. > > Maybe we should initialize it to the time of the session creation ? > > I suggest you create a JIRA suggesting this, so that we can discuss this > option, which seems reasonnable to me. > > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com > >
