tmp_buf = (ctypes.c_char * size).from_address(ctypes.addressof(buffer.contents)
    )
mview = memoryview(tmp_buf)[OFFSET:AMOUNT]
_ = sock.recv_into(mview, AMOUNT)
How do I use ctypes to recv_into a C buffer multiple times?