Speaking of Windows Application Layer network communication has to mention Winsock,winsock is working in the TCP/IP layer of the application layer (TCP/IP layer is divided into host to network layer "bit", Network interconnect layer "data frame", Transport Layer "packet", Application Layer "data segment"), This is the two modes (blocking mode and non-blocking mode) and six models (blocking "block", select "Select", wsaasynselect "Async select", "Api,winsock") provided by Windows to the lowest-level network communication application layer we use. WSAEventSelect "Event Selection", overlapped "overlap", completionport "completion port" are the basic choice of many network software, they all have their own advantages and disadvantages depending on the scene. Choose which mode and which model the application effect is different. Blocking mode is easy to use, but has not adapted to the current network communication response speed requirements, but the non-blocking mode is more complex, is the current mainstream mode; The main trend in the six models is to use the completion port model (IOCP), for specific reasons, refer to section 9.3 of the design and implementation of the three-dimensional game engine.
Windows Application Layer Network module literacy