Quote Originally Posted by naroin View Post
What do i do that i should not do?
You assume that if some data arrives then all data arrives which is not the case. TCP is a stream of bytes without any internal structure. The fact that the sender sends 5 different chunks of data doesn't mean it will also arrive in 5 chunks. It may be one chunk or 99999+ chunks.