Hello!

Unfortunately, libuv couldn't give you such guarantees, even more - right
now the order is a FIFO, i.e. each handle is prepended to the
`closing_handles` list.

This may change in future, so please don't rely on any order. I would
suggest trying to perform some sort of refcounting in server code, closing
it only after all connections were closed.

Cheers,
Fedor.


On Mon, Apr 14, 2014 at 12:45 PM, Iñaki Baz Castillo <[email protected]> wrote:

> Hi,
>
> I've got a TCPServer (uv_tcp_t) and several TCPClient connections
> (uv_tcp_t) accepted. At some point I want to close the TCPServer and
> its connections, but when a connection is closed its close_cb calls to
> a method in the TCPServer, so I need to be sure that the following is
> true:
>
> - calling uv_close on all the client connections (uv_tcp_t),
> - and then (without waiting for the close_cb of the connections)
> calling uv_close on the TCP server (uv_tcp_t),
>
> this will cause that the close_cb of all the client connections will
> be called *BEFORE* the close_cb of the TCP server.
>
> Is this true?
>
> Thanks a lot.
>
> --
> Iñaki Baz Castillo
> <[email protected]>
>
> --
> 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