def METHOD_NAME(self, size=None):
    ret = []
    data = self.read()
    while data:
        pos = data.find(b"\n")
        if pos < 0:
            ret.append(data)
            data = b""
        else:
            line, data = data[:pos + 1], data[pos + 1:]
            ret.append(line)
    return ret