session table support get oldest/newest session

This commit is contained in:
luwenpeng
2023-12-13 17:56:27 +08:00
parent fc5b5857b8
commit 92e5110503
7 changed files with 200 additions and 26 deletions

View File

@@ -79,7 +79,7 @@ struct session
******************************/
// session pool recycle handle
struct session *next;
struct session *next_free_ptr;
/******************************
* Session Table Zone
@@ -89,9 +89,18 @@ struct session
uint64_t id;
struct session_address addr;
struct session *next_ptr;
struct session *prev_ptr;
// session table handle
UT_hash_handle hh1; /* handle for root_id hash table */
UT_hash_handle hh2; /* handle for root_addr hash table */
/******************************
* Session Manager Zone
******************************/
struct session *next_ready_ptr;
};
#ifdef __cpluscplus