rcelyte / BeatUpRcelyte

A lightweight modded Beat Saber multiplayer server
The Unlicense
17 stars 5 forks source link

Refactor web host to use asynchronous I/O #28

Open rcelyte opened 8 months ago

rcelyte commented 8 months ago

The current implementation spawns and detaches a new thread for every connection, making it extremely intensive and prone to resource exhaustion under load. It would be better to have a fixed pool of long running threads all simultaneously waiting on the listener socket, with each thread adding its share of incoming connections to a local connection list monitored via select/epoll/kqueue/IOCP.