Add session manager

This commit is contained in:
luwenpeng
2023-12-13 19:20:34 +08:00
parent 1aecef82d6
commit 5620ac211b
8 changed files with 320 additions and 32 deletions

View File

@@ -10,18 +10,11 @@ extern "C"
{
#endif
#include "timeout.h"
#include "uthash.h"
#include "session.h"
#include "session_address.h"
#define TIMEOUT_CB_OVERRIDE
struct timeout_cb
{
session_expire_cb fn;
struct session *arg;
};
#include "timeout.h"
#define EX_DATA_MAX_COUNT 128
#define SESSION_EVENT_QUEUE_SIZE 256
@@ -72,7 +65,9 @@ struct session
// session timer
struct timeout timeout;
uint64_t abs_expire_ts;
session_expire_cb expire_cb;
void *expire_arg;
uint64_t expire_abs_ts;
/******************************
* Session Pool Zone