def METHOD_NAME(self, data, flags=0):
    if flags != 0:
        raise ValueError("non-zero flags not allowed in calls to sendall")
    count = 0
    with memoryview(data) as view, view.cast("B") as byte_view:
        amount = len(byte_view)
        while count < amount:
            v = self.send(byte_view[count:])
            count += v