Hello!

I think you could use some `uv_timer_t` to detect stale clients. Generally,
the kernel should expose it's own timeout for TCP ACKs, but if you feel
like it is way too slow for your application - use of the timers in your
code could solve it.

Cheers,
Fedor.


On Mon, Jul 14, 2014 at 9:08 AM, Ashish <[email protected]> wrote:

>
> Lets say many clients are connected to a tcp server and server is
> asynchronously sending them certain number of bytes.
> Now if one of the clients does never read those bytes (never calls
> WSARecv), those bytes get accumulated at server end. After that,
> surprisingly other clients too do not receive their bytes.
>
> This results in never getting uv_write_cb in server code.
>
> If we disconnect the client (who has stopped calling WSARecv) things comes
> on normal track, and we can see other clients receiving their bytes.
>
> How can we proactively stop this happening?
> I mean is there any way to detect client stopped reads. (So we can
> proactively disconnect it before too many bytes get accumulated at server
> end)
>
> Tnx,
> Ashish
>
>  --
> 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.
>

-- 
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