|
It is estimated that the function that the host wants is not achieved, at least not the kind of effect that the host imagined, but AcceptEx is submitted one by one in order, but there are two kinds, one is to return immediately when connected, that is, set to wait for reception The buffer is 0, and the other is to wait for data to return. It is recommended that the host use not waiting for reception, so that AcceptEx will trigger the completion event as long as there is a connection, and then hand the Accept operation to the thread, and receive This thread that completes the event immediately starts a new AcceptEx, so that basically the purpose of the host can be achieved, and AcceptEx can submit multiple requests at the same time (the key is whether it is necessary, if the bottleneck lies in the Accept for the new connection, then Consider increasing the number of AcceptEx). |
|