I'm writing a client that connects to a server
Sometimes the server send dome special packets to the client with the size of 30kb but on client side I get that 30kb in multiple smaller packets (1kb) so my OnReceive
callback calls almost 30 times until I get the full packet.
I managed to solve this problem by putting an Sleep(1000)
just right before CAsyncSocket::Receive
and then I get all 30kb in one single packet but putting Sleep()
is a very bad idea.
Is there any configuration that I should do for CAsyncSocket
?