On Thursday, April 24, 2014 3:48:42 PM UTC+5:30, Iñaki Baz Castillo wrote:
>
> 2014-04-24 12:02 GMT+02:00 Atul <[email protected] <javascript:>>: 
> > I believe we also always get nread < 0 in read callback (read_cb) 
> whenever 
> > client disconnects (crash or lost Internet) ? 
> > 
> > Can we not reply on that? 
>
> That is not true. Internet TCP connections are not a "physical wire". 
> If you crash or loose Internet connection then your computer WONT send 
> a TCP FIN or TCP RESET to the server so the server WONT realize of 
> your disconnection (until it tries to write, but what about if the 
> server does NEVER attempt to write you? it would keep your ghost 
> connection forever and ever!). 
>

>
> -- 
> Iñaki Baz Castillo 
> <[email protected] <javascript:>> 
>


Well, when I tried on local client/server scenario, whenever I *killed*client, 
I always get notification via read_cb (with nread <0) 
In this case also there is no chance my client sent any signal to server. 
Made me think its reliable way to close handle in read_cb only.
Not sure really why the same could not be not true for Internet connections.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to