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

StackOverflow https://stackoverflow.com/questions/23477200

  •  15-07-2023
  •  | 
  •  

문제

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 i.e. 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top