Add type field to session::Key to help avoid collisions in map

This commit is contained in:
Tim Wojtulewicz 2021-05-20 11:00:11 -07:00
parent 30ab914cd8
commit 3a8047f535
4 changed files with 20 additions and 13 deletions

View file

@ -113,7 +113,10 @@ public:
// should be marked invalid.
const detail::ConnKey& Key() const { return key; }
session::detail::Key SessionKey(bool copy) const override
{ return session::detail::Key{&key, sizeof(key), copy}; }
{
return session::detail::Key{
&key, sizeof(key), session::detail::Key::CONNECTION_KEY_TYPE, copy};
}
const IPAddr& OrigAddr() const { return orig_addr; }
const IPAddr& RespAddr() const { return resp_addr; }