MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getHash

Method getHash

engine/source/platform/platformNet.cpp:2003–2019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2001}
2002
2003U32 NetAddress::getHash() const
2004{
2005 U32 value = 0;
2006 switch (type)
2007 {
2008 case NetAddress::IPAddress:
2009 value = hash((U8*)&address.ipv4.netNum, sizeof(address.ipv4.netNum), 0);
2010 break;
2011 case NetAddress::IPV6Address:
2012 value = hash((U8*)address.ipv6.netNum, sizeof(address.ipv6.netNum), 0);
2013 break;
2014 default:
2015 value = 0;
2016 break;
2017 }
2018 return value;
2019}
2020
2021bool Net::isAddressTypeAvailable(NetAddress::Type addressType)
2022{

Callers 6

HashNetAddressFunction · 0.45
findMethod · 0.45
addToTableMethod · 0.45
removeFromTableMethod · 0.45
computeNetMD5Method · 0.45

Calls 1

hashFunction · 0.50

Tested by

no test coverage detected