The concept of contacting the IOCP is when I started to work online in April this year, if it is not a friend who makes a network programming especially server programming, I can even know the concept of IOCP, this is not surprising. As a netizen said, IOCP is a system-level queue and a mechanism for maintenance of this queue. We can implement a server model based on the IOCP architecture according to the basic fixed manner. Establishing the basic steps of IOCP have introduced, and you can find a lot, I can find a lot, I use the language is Delphi, the finally implemented server, and a client opens 3,000 ports to connect to the server. As a result, the client is a system resource error, and the server is still good. I think this test has basically satisfied my game server needs.
Based on my current understanding, there may be two main points in IOCP efficiency: one is an idle useless connection; the other is the HandleData used each time. For these two points, many people have put forward a better implementation. For idle connections, you can have a dedicated thread for monitoring. How long does it take to connect to the data on a connection to disconnect this connection; for each time sending and receiving, you must create new handleData, you can create a Handledata data in advance. The queue structure of the block is used from the head from the head.
Today, the project has been launched for nearly seven months, and the overall project progress cannot be satisfactory, but it is worth a summary experience. Now the company's second game development is close to the end, the corresponding server architecture and client architecture The basic completion of the two games is also roughly. However, the road in front is still very long, the product itself has a lot of distances from the architecture that I have envisaged. The road behind it is still very long. In short, the goal is to achieve: Let the player can find happiness in the game, forget the troubles of life . Ha ha.