boost::urls::authority_view::host_ipv4_address
Return the host IPv4 address
Synopsis
Declared in header <boost/url/authority_view.hpp>
ipv4_address
host_ipv4_address() const noexcept;
Description
If the host type is host_type::ipv4 , this function returns the address as a value of type ipv4_address . Otherwise, if the host type is not an IPv4 address, it returns a default-constructed value which is equal to the unspecified address "0.0.0.0".
assert( url_view( "http://127.0.0.1/index.htm?user=win95" ).host_ipv4_address() == ipv4_address( "127.0.0.1" ) );