🦄 refactor(stellar_module to module): simplify stellar module to module

This commit is contained in:
yangwei
2024-11-05 09:39:10 +08:00
parent a415794428
commit 7f81e46522
17 changed files with 274 additions and 279 deletions

View File

@@ -6,7 +6,7 @@ extern "C"
#endif
#include "stellar/packet.h"
#include "stellar/module_manager.h"
#include "stellar/module.h"
enum session_state
{
@@ -147,8 +147,9 @@ void session_set_discard(struct session *sess);
void session_set_exdata(struct session *sess, int idx, void *ex_ptr);
void *session_get_exdata(const struct session *sess, int idx);
#define SESSION_MANAGER_MODULE_NAME "session_manager_module"
struct session_manager;
struct session_manager *stellar_module_get_session_manager(struct stellar_module_manager *mod_mgr);
struct session_manager *module_to_session_manager(struct module *mod);
int session_manager_new_session_exdata_index(struct session_manager *sess_mgr, const char *name, exdata_free *func, void *arg);
// When the state is SESSION_STATE_CLOSED, the packet is NULL, and the session will be destroyed.