Reputation: 1020
I am using Asynchronous socket.
the server sends MSG to client continuously. client receives all the MSG but sometimes two or three messages at one time.
Upvotes: 0
Views: 104
Reputation: 12951
This is absolutely normal. Moreover, you are not guaranteed to read each time an integral number of your "messages". I mean, you may read 1.5 message (one and a half), then next time read 2.7 (the remaining half, two more, and a bit of the next), and so on.
You have to implement the logic that splits the stream into messages.
Upvotes: 1