read all data from socket when data length is larger