MCPcopy Create free account
hub / github.com/SFML/SFML / resolveV4

Function resolveV4

test/TestUtilities/NetworkUtil.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84std::vector<sf::IpAddress> resolveV4(std::string_view hostname)
85{
86 auto addresses = sf::Dns::resolve(hostname).value_or(std::vector<sf::IpAddress>{});
87 addresses
88 .erase(std::remove_if(addresses.begin(), addresses.end(), [](const auto& address) { return !address.isV4(); }),
89 addresses.end());
90 return addresses;
91}
92
93std::vector<sf::IpAddress> resolveV6(std::string_view hostname)
94{

Callers 2

TcpSocket.test.cppFile · 0.85
Dns.test.cppFile · 0.85

Calls 4

eraseMethod · 0.80
isV4Method · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected