You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I'm trying to develop network application with multithreaded network read write requirement.
I've implemented a lot with libuv, but now I can't find any resource to solve multithreaded issue.
I have thread A which is running only server binded socket and I want to use it only for accepting connections, and after having connection accepted I want to start reading from thread B which is running another libuv loop.
So the point is to have 1 loop just for accepting connections and another loop just for reading data from that connections.
Is there a way to do that ? (even by hacking something :) )
// Accept connectionif(uv_accept(server, (uv_stream_t*)client) ==0) {
..................
..................
// how can I call uv_read_start for a different loop ???intr=uv_read_start((uv_stream_t*)client, alloc_cb, on_read);
if(r) {
uv_close((uv_handle_t*) client, close_client);
return;
}
} else {
uv_close((uv_handle_t*) client, close_client);
}
The text was updated successfully, but these errors were encountered:
Hi I'm trying to develop network application with
multithreaded
network read write requirement.I've implemented a lot with
libuv
, but now I can't find any resource to solve multithreaded issue.I have
thread A
which is running only server binded socket and I want to use it only for accepting connections, and after having connection accepted I want to start reading fromthread B
which is running another libuv loop.So the point is to have 1 loop just for accepting connections and another loop just for reading data from that connections.
Is there a way to do that ? (even by hacking something :) )
The text was updated successfully, but these errors were encountered: