help
help copied to clipboard
can you provide a multi thread tcp server sample? uv_write2 only works only with multi processes ?
uv_write2 can't send file handle to pipe between threads?
I get hints from other posts:
"There is no way to accept a client on another loop. There are a number of things you can do:
create the listener handle, then create X new loops, send the handle to them using uv_write2 and listen in all of them if you're on Linux (> 3.9 IIRC), create X new loops and bind a handle to the same IP and port using SO_REUSEPORT have a single loop accept all incoming connections and send them to other loops using uv_write2." but it doesn't figure out it's in multi threads or multi processes.
You can check out benchmark-multi-accept.c!
But there are bugs in Windows!