MCPcopy Create free account
hub / github.com/F-Stack/f-stack / HashValue

Method HashValue

adapter/micro_thread/mt_net.cpp:586–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586uint32_t CNetHandler::HashValue()
587{
588 uint32_t ip = _dest_ipv4.sin_addr.s_addr;
589 ip ^= (_dest_ipv4.sin_port << 16) | (_proto_type << 8) | (_conn_type << 8);
590
591 uint32_t hash = (_session_id >> 32) & 0xffffffff;
592 hash ^= _session_id & 0xffffffff;
593 hash ^= ip;
594
595 return hash;
596}
597
598int32_t CNetHandler::HashCmp(HashKey* rhs)
599{

Callers 3

HashInsertMethod · 0.45
HashFindMethod · 0.45
HashRemoveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected