You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by "ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)" <na...@gmail.com> on 2012/07/27 09:18:48 UTC

Timing out in case of NEED_DATA.

Hi,
When a decoder result as NEED_DATA is returned, then it is expected that
more data will be received. As a worst case, it is probable that, the
expected data does not ever come. How do I handle this scenario ? I am
using idle time for session read/write as a 'heartbeat' monitor.

ನಾಗೇಶ್

Re: Timing out in case of NEED_DATA.

Posted by "ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)" <na...@gmail.com>.
Thank you, Emmanuel, for the response.

Perhaps, something like IdleStatus.NEED_DATA field and a method as
sessionIdleNeedData(IoSession) would be  great ?

ನಾಗೇಶ್

Re: Timing out in case of NEED_DATA.

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 7/27/12 9:18 AM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) a écrit :
> Hi,
> When a decoder result as NEED_DATA is returned, then it is expected that
> more data will be received. As a worst case, it is probable that, the
> expected data does not ever come. How do I handle this scenario ? I am
> using idle time for session read/write as a 'heartbeat' monitor.
There is no other way.

When a client brutally unplug from the network, the server will never 
get informed about it. You have to handle such a situation on the server 
through some idle detection.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com