I am trying to create a multi-threaded server using Tokio following the example below by @alexcrichton. However I cannot get the server to serve using more than one thread. The threads run but only one thread serves connections. I made a test client that created thousands of connections but I still couldn't get more than one thread to serve. https://gist.github.com/alexcrichton/7174bbf6c2359f2b9a2de0d0d3973a09
Unfortunately reuse_port AFAIK is not implemented on Windows. What I'd recommend for a cross-platform multithreaded server is to have a thread that's using blocking I/O with std::net::TcpListener and then accepted connections are shipped over to worker threads and bound with TcpStream::from_stream
Whoosh! Completely missed the windows part - sorry @tjamaan. I'd look for a windows analog - not sure if it exists. If not, @alexcrichton's proposal is probably the way to go.