def METHOD_NAME(self, loop, data):
    # split data into 4K blocks, to not overwhelm the channel
    block_size = 4096
    for i in range(0, len(data), block_size):
        loop.call_soon_threadsafe(self.send_data, data[i:i + block_size])
    loop.call_soon_threadsafe(self.done)
    loop.call_soon_threadsafe(self.close)