简体   繁体   中英

Converting boost::asio::ip::address_v4::bytes_type into boost::asio::ip::address_v4

I want to convert array of bytes of type boost::asio::ip::address_v4::bytes_type into boost::asio::ip::address_v4 .

So my question is there any embedded function in boost library that do this job, or I need to do it manually ie Convert the array into string IP address and then pass it to the constructor of address_v4?

Are you looking for the constructor that takes a bytes_types ? explicit address_v4(const bytes_type & bytes);

See http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/ip__address_v4/address_v4.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM