Original Post
Could someone please give me some hints here? I've just started messing with IOCP in C#, but I'm feeling quite unsure about my own design and the code I'm writing. The scheme I have planned so far is as follows: All threads (20 or so) in a threadpool will continiously listen for incoming connections and listen for activity on the IOCP. If there's a new incoming connection, the threads that listen will dispatch a new socket to the IOCP, which will be picked up by the threads that listen to the IOCP. The threads that listen to the IOCP will then proceed to asynchronously read some data, and determine based on a huge select-case structure what to do with the data read (including determining if more data should be read). If there's no data to be read, the socket will be dispatched to the IOCP again, only to be picked up by yet another thread - or the same one. The same thing happens if data was read and could be processed correctly. Is this a good scheme (I.E will it make for scalable server software)? Are there better schemes out there, and if so - which ones? Thanks in advance! Edit: And YES, I'm making an MMORPG, and NO - I'm not quitting - especially when I've come this far (seeing as I have IOCP code that actually runs (not that it's much yet, but still...), and a design scheme for my server).