I currently have made a multithreaded server in c++ for windows, where each connected client gets a thread to themselves which stays running until the client's socket is closed.
When a client connects, they can run commands (fetch motd, get current version of the client) or can login to get access to other commands (fetch user information, download files, etc).
So far this basic approach has worked well, but I have noticed that there have been an increasing amount of clients using my service and I'm starting to worry about how efficient this approach is. I've read online that a process in windows can only handle somewhere around 1500-2000 threads, and I think I might soon hit that amount of simultaneous users, and I think it's about time I changed my design around.
What would be the best way to handle this amount of users?