#include <C4PuncherHash.h>
Definition at line 63 of file C4PuncherHash.h.
◆ operator()()
Definition at line 64 of file C4PuncherHash.h.
69 sockaddr_in v4 = addr;
70 auto unpack = make_tuple(v4.sin_family, v4.sin_addr.s_addr, v4.sin_port);
71 return hash<decltype(unpack)>()(unpack);
75 sockaddr_in6 v6 = addr;
76 auto unpack = make_tuple(v6.sin6_family, v6.sin6_port, v6.sin6_flowinfo, std::string((
char*) v6.sin6_addr.s6_addr, 16), v6.sin6_scope_id);
77 return hash<decltype(unpack)>()(unpack);
80 assert(!
"Unexpected address family");
AddressFamily GetFamily() const
References C4NetIO::HostAddress::GetFamily(), C4NetIO::HostAddress::IPv4, C4NetIO::HostAddress::IPv6, and C4NetIO::HostAddress::UnknownFamily.
The documentation for this struct was generated from the following file: