Return-Path: X-Original-To: apmail-mina-users-archive@www.apache.org Delivered-To: apmail-mina-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8131CC7CA for ; Mon, 18 Jun 2012 04:00:42 +0000 (UTC) Received: (qmail 29589 invoked by uid 500); 18 Jun 2012 04:00:42 -0000 Delivered-To: apmail-mina-users-archive@mina.apache.org Received: (qmail 29533 invoked by uid 500); 18 Jun 2012 04:00:40 -0000 Mailing-List: contact users-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@mina.apache.org Delivered-To: mailing list users@mina.apache.org Received: (qmail 29488 invoked by uid 99); 18 Jun 2012 04:00:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 04:00:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nageshblore@gmail.com designates 209.85.215.171 as permitted sender) Received: from [209.85.215.171] (HELO mail-ey0-f171.google.com) (209.85.215.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 04:00:32 +0000 Received: by eaaa12 with SMTP id a12so1519894eaa.2 for ; Sun, 17 Jun 2012 21:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ri5ik+2Z7X5Ol9K0F4+NLU8aD6z7OvzXTYJ1yJHNzNw=; b=Xs2acl0+JqsEDcSnMe2RfXfNcgXft5Q7bFms0Q7wYMgmaX+8+2fXqnRRwhwIqlzEcz sGsOERBHo71kgPx8r2EYz3+m6oftUrlNguP3VKvFTWixgtRlTBTKTfZM8l12EuTESjbV Wy9iS9eFFfqkPTmjG1ZyYTajdDmmNN20/c0HsGRkbCYei3xiR4+PfaYeBDJp1/QaYG63 GEMZNJxdAD77QR+J0LrbVkKdi4AhufzAXhaIc6cUJS9frx35zTxquU4BFmTbTOFfCBBE oKt44woKddTn7lOxXdMDfWjRdgdL6GVE1x9Hy3pQ0IFKy2bM0WKxYSBQSKPl5pwPcqAg qEGg== MIME-Version: 1.0 Received: by 10.14.45.15 with SMTP id o15mr11482eeb.43.1339992011606; Sun, 17 Jun 2012 21:00:11 -0700 (PDT) Received: by 10.14.98.140 with HTTP; Sun, 17 Jun 2012 21:00:11 -0700 (PDT) In-Reply-To: <4FDE3203.4070001@gmail.com> References: <4FDE3203.4070001@gmail.com> Date: Mon, 18 Jun 2012 09:30:11 +0530 Message-ID: Subject: Re: What does getLastReadTime return ? From: =?UTF-8?B?4LKo4LK+4LKX4LOH4LK24LONIOCyuOCzgeCyrOCzjeCysOCyueCzjeCyruCyo+CzjeCyryAoTg==?= =?UTF-8?B?YWdlc2ggUyk=?= To: users@mina.apache.org, elecharny@apache.org Content-Type: multipart/alternative; boundary=90e6ba6151acda8c5904c2b7332e --90e6ba6151acda8c5904c2b7332e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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.) ? =E0=B2=A8=E0=B2=BE=E0=B2=97=E0=B3=87=E0=B2=B6=E0=B3=8D On Mon, Jun 18, 2012 at 1:07 AM, Emmanuel L=C3=A9charny wrote: > Le 6/17/12 7:39 PM, =E0=B2=A8=E0=B2=BE=E0=B2=97=E0=B3=87=E0=B2=B6=E0=B3= =8D =E0=B2=B8=E0=B3=81=E0=B2=AC=E0=B3=8D=E0=B2=B0=E0=B2=B9=E0=B3=8D=E0=B2= =AE=E0=B2=A3=E0=B3=8D=E0=B2=AF (Nagesh S) a =C3=A9crit : > > Hi, >> In my server implementation, I am handling a 'heartbeat' message from >> connected client every n number of seconds. If the message is not receiv= ed >> 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() >> ) report the time in milliseconds from some other benchmark ? Because, i= t >> 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 be= en > read. > > Isn't it what you expect ? > > > -- > Regards, > Cordialement, > Emmanuel L=C3=A9charny > www.iktek.com > > --90e6ba6151acda8c5904c2b7332e--