Original Post
Hi, I've made posts here a few times and you guys have always been extremely helpful. Currently my server is structured this way (WinSock, C++): - Check if any new connection has been made (non-blocking) - Every frame call recv() (non-blocking) on each player socket - Update players and nearby NPCs - Update any other housekeeping stuff This obviously uses 100% of the computer processor 100% of the time. I'd like to do this a better way. From what I have read, a good alternative is to do the updates/housekeeping only when I receive data. In addition, the client would send 'heartbeat' packets every second or so, which would force an update regardless if they were simply standing around. Now my issues come up: how to do this effectively? Should I look into IOCP? Would that meet my requirements (minimal threads, low CPU usage when there's a low amount of players)? Thanks for your time :)