MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsFamily

Method IsFamily

src/network/core/address.cpp:133–139  ·  view source on GitHub ↗

* Checks of this address is of the given family. * @param family the family to check against * @return true if it is of the given family */

Source from the content-addressed store, hash-verified

131 * @return true if it is of the given family
132 */
133bool NetworkAddress::IsFamily(int family)
134{
135 if (!this->IsResolved()) {
136 this->Resolve(family, SOCK_STREAM, AI_ADDRCONFIG, nullptr, ResolveLoopProc);
137 }
138 return this->address.ss_family == family;
139}
140
141/**
142 * Checks whether this IP address is contained by the given netmask.

Callers 1

SendPacketMethod · 0.80

Calls 2

IsResolvedMethod · 0.95
ResolveMethod · 0.95

Tested by

no test coverage detected