Home > Back-end >  IOCP WSASend continuous delivery for help
IOCP WSASend continuous delivery for help

Time:01-07

Test conditions:
Define the buffer is only 2048 bytes
1024 * 2 # define MAX_MAIN_PACKET_SIZE

Struct IO_MAIN_BUFFER
{
BYTE buff [MAX_MAIN_PACKET_SIZE];
Int size;
};

At the time of delivery WSASend, if I am a client delivery 7 packs in a row, size of 30, 2048, 2048, 2048 respectively 2048, 2048, 30
So regular 3-4 bags in the front of the client instantly received, over a period of time to receive the rest of the pack.

Could you tell me what reason be cause? How to solve?

When design the game server, A player standing on the map, if A flash player BCDEFG etc all appear on the map, then these six players respectively will occur at the same time their own information to give the players A, is the moment of continuous delivery multiple packages to a. so delay sending problem what should you do?

CodePudding user response:

Has ruled out sticky package problems. After a period of time the client to receive all the data
  • Related