mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Use unordered_map to store sessions for performance reasons
This commit is contained in:
parent
2a717e05cc
commit
e2dc6df8a2
4 changed files with 36 additions and 4 deletions
|
@ -70,4 +70,14 @@ bool Key::operator<(const Key& rhs) const
|
|||
return memcmp(data, rhs.data, size) < 0;
|
||||
}
|
||||
|
||||
bool Key::operator==(const Key& rhs) const
|
||||
{
|
||||
if ( size != rhs.size )
|
||||
return false;
|
||||
else if ( type != rhs.type )
|
||||
return false;
|
||||
|
||||
return memcmp(data, rhs.data, size) == 0;
|
||||
}
|
||||
|
||||
} // namespace zeek::session::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue