2014-07-07 13:34 GMT+02:00 Claudio Bisegni <[email protected]>:
> i agree with you, but i don't know hoe design a single loop that run and tcp
> client allocation.
>
> I was thinking about to use uv_run in a thread using UV_RUN_ONCE and use
> read/write lock between run thread and forward thread to submit new client
> within the loop.
>
> What do you think about that?


If you are thinking in threads and/or on multiple libuv loops then you
are thinking wrongly. Really.

May I ask why you are using libuv? it is clear from your code that the
only you are doing is opening a TCP connecion, sending data, and
closing it, no more. You can do that with traditional sockets.

libuv is designed to be the base of an application, this is, all the
application should run on the rules of the libuv loop.

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

Reply via email to