I have a rare bug that seems to occur reading a socket.
It seems, that during reading of data sometimes I get only 1-3 bytes of a data package that is bigger than th
From the Linux man page of recv http://linux.about.com/library/cmd/blcmdl2_recv.htm:
The receive calls normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested.
So, if your sender is still transmitting bytes, the call will only give what has been transmitted so far.