def METHOD_NAME(self):
    try:
        data = self.recv(self.ac_in_buffer_size)
    except BlockingIOError:
        return
    except OSError:
        self.handle_error()
        return
    if isinstance(data, str) and self.use_encoding:
        data = bytes(str, self.encoding)
    self.ac_in_buffer = self.ac_in_buffer + data
    while self.ac_in_buffer:
        lb = len(self.ac_in_buffer)
        terminator = self.get_terminator()
        if not terminator:
            # no terminator, collect it all
            self.collect_incoming_data(self.ac_in_buffer)
            self.ac_in_buffer = b''
        elif isinstance(terminator, int):
            # numeric terminator
            n = terminator
            if lb < n:
                self.collect_incoming_data(self.ac_in_buffer)
                self.ac_in_buffer = b''
                self.terminator = self.terminator - lb
            else:
                self.collect_incoming_data(self.ac_in_buffer[:n])
                self.ac_in_buffer = self.ac_in_buffer[n:]
                self.terminator = 0
                self.found_terminator()
        else:
            terminator_len = len(terminator)
            index = self.ac_in_buffer.find(terminator)
            if index != -1:
                if index > 0:
                    self.collect_incoming_data(self.ac_in_buffer[:index])
                self.ac_in_buffer = self.ac_in_buffer[index +
                                                      terminator_len:]
                self.found_terminator()
            else:
                index = find_prefix_at_end(self.ac_in_buffer, terminator)
                if index:
                    if index != lb:
                        self.collect_incoming_data(
                            self.ac_in_buffer[:-index])
                        self.ac_in_buffer = self.ac_in_buffer[-index:]
                    break
                else:
                    self.collect_incoming_data(self.ac_in_buffer)
                    self.ac_in_buffer = b''