now read() will return the remaining bytes always if the other side has
closed the connection.