Hi folks!

I would like to know the correct way to pass the tcp handle of a connection 
to another thread that will read / write this handle.

The idea is, on the main thread, listen and accept new connections. These 
connections are validated using a handshake protocol on this same thread 
and if everything is ok, that connection is added to a queue that will be 
processed by another thread.

Currently in raw sockets I can simply pass the socket file descriptor 
between threads, but in libuv I've been seeing examples where it uses IPC 
pipes and uv_write2. 
But in my case what I need to do is a inter-thread handle communication but 
not an inter-process communication. 
I think that the boilerplate and overhead of ipc pipes, (listen, write, 
read ipc's) just to pass a handle within the same process should not be the 
correct approach ... or should it? 
I would like  to get your feedback.

Thank you!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/2630712c-bc5a-4120-94c2-57966077cdd2o%40googlegroups.com.

Reply via email to