Return the host as an IPv4 address.
urls::ipv4_address ipv4_address() const;
If host_type
equals urls::host_type::ipv4
, this function returns the
corresponding ipv4_address
of the host if it
exists, otherwise it returns the unspecified address which is equal to
"0.0.0.0".
url_view u( "http://127.0.0.1/index.htm?user=win95" ); ipv4_address ip = u.ipv4_address();
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet dec-octet = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255
Throws nothing.
encoded_hostname
, hostname
, host_type
, ipv6_address
, ipvfuture
, urls::ipv4_address
.