asio::ip::address_v6 takes a bytes_type for a parameter, which is basically a boost::array in network-byte order.
I have a RAW IPv6 address in a void * variable. What’s the quickest way to turn a void * into a asio::ip::address_v6? Preferably using the constructor.
You can’t do better than initializing an
asio::ip::address_v6::bytes_type, which can actually be astd::arrayor aboost::array:Note that it would be better to directly store a
bytes_typeinstead of thatvoid*, if you are able to modify that structure, obviously.