refactor: packet manager and session manager add on_thread_init/on_thread_exit entry

This commit is contained in:
luwenpeng
2024-10-23 10:10:20 +08:00
parent fd3cc20554
commit 3f3059b40f
16 changed files with 205 additions and 154 deletions

View File

@@ -481,6 +481,8 @@ struct session_manager_config *session_manager_config_new(const char *toml_file)
}
int ret = 0;
ret += load_toml_integer_config(toml_file, "instance.id", (uint64_t *)&sess_mgr_cfg->instance_id, 0, 4095);
ret += load_toml_integer_config(toml_file, "packet_io.thread_num", (uint64_t *)&sess_mgr_cfg->thread_num, 0, MAX_THREAD_NUM);
ret += load_toml_integer_config(toml_file, "session_manager.tcp_session_max", (uint64_t *)&sess_mgr_cfg->tcp_session_max, EVICTE_SESSION_BURST * 2, UINT64_MAX);
ret += load_toml_integer_config(toml_file, "session_manager.udp_session_max", (uint64_t *)&sess_mgr_cfg->udp_session_max, EVICTE_SESSION_BURST * 2, UINT64_MAX);