The socket recv() call should wait for all bytes otherwise
the socket will timeout and message responses will be truncated.