Not quite. We have implemented this, but it does not close the channel if the
network cable is unplugged. (neither remotlyclosed nor locallyclosed
functions get called.)
I'm most surprised that you can still write (without an exception!) to a
channel whose client is no longer connected to the network.
survivant wrote:
>
> can this blog help you ?
>
> http://weblogs.java.net/blog/2008/11/25/grizzly-how-be-notify-when-client-disconnect
>
>
>
> 2009/12/22 ichinco <ichinco_at_gmail.com>
>
>>
>> Hello, all,
>>
>> Is there a way to tell on the server-side whether a client has lost
>> network
>> connection (ie, network cable pulled)?
>>
>> The channel doesn't get closed automatically,
>> SelectionKey.channel().isOpen() reports true, and if I try to write to it
>> (OutputWriter.flushChannel), there is no IOError. Is there a fool-proof
>> way
>> to tell whether the channel is still open from the server side?
>>
>> Thanks!
>> --
>> View this message in context:
>> http://old.nabble.com/detect-network-disconnected--tp26891745p26891745.html
>> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>
>
> --
> -------------
> A+
>
> Sébastien.
>
> Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
> http://twitter.com/survivant
>
>
--
View this message in context: http://old.nabble.com/detect-network-disconnected--tp26891745p26895232.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.