asio C++ library

PrevUpHomeNext

ip::address_v4::is_loopback

Determine whether the address is a loopback address.

bool is_loopback() const;

This function tests whether the address is in the address block 127.0.0.0/8, which corresponds to the address range 127.0.0.0 - 127.255.255.255.

Return Value

(to_uint() & 0xFF000000) == 0x7F000000.


PrevUpHomeNext