def readline(self, current_time=None):
        if current_time is None:
            current_time = time.time()

        # Keep our underlying buffer of bytes filled up.
        if self.__buffer is None or (self.__available_buffer_bytes() < self.__max_line_length and
                                     self.__more_file_bytes_available()):
            self.__fill_buffer(current_time)

        # The following code and the sanity check below were to check for an old bug that was fixed a long time ago.
        # original_buffer_index = self.__buffer.tell()
        # expected_buffer_index = self.__determine_buffer_index(self.__position)
        # Just a sanity check.
        #if len(self.__buffer_contents_index) > 0 and self.__position != self.__buffer_contents_index[-1].position_end:
        #    if expected_buffer_index != original_buffer_index:
        #        assert expected_buffer_index == original_buffer_index, (
        #            'Mismatch between expected index and actual %ld %ld',
        #            expected_buffer_index, original_buffer_index)

        # read a complete line from our line_matcher
        result = self.__line_matcher.readline(self.__buffer, current_time)
        if len(result) == 0:
            return result

        self.__position = self.__determine_mark_position(self.__buffer.tell())

        # Just a sanity check.
        #if len(self.__buffer_contents_index) > 0:
        #    expected_size = self.__buffer_contents_index[-1].buffer_index_end
        #    actual_size = self.__file_system.get_file_size(self.__buffer)
        #    if expected_size != actual_size:
        #        assert expected_size == actual_size, ('Mismatch between expected and actual size %ld %ld',
        #                                              expected_size, actual_size)

        return result
(bool) does this socket have enqueued data ready
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/log_processing.py/LogFileIterator.readline--crossover with--dataset/ETHPy150Open richo/groundstation/groundstation/sockets/stream_socket.py/StreamSocket.has_data_ready