refactor: 收口为hub/peer/bridge 三程序并统一 支持 tcp/udp/kcp"

This commit is contained in:
nnbcccscdscdsc
2026-03-17 16:28:35 +08:00
parent 6c975d9ae3
commit 20b2050706
17 changed files with 2766 additions and 6398 deletions

View File

@@ -80,6 +80,13 @@ typedef struct OmniStats {
/* 初始化统计模块,在程序启动时调用一次 */
void logger_init(void);
/* 设置当前进程的日志上下文,便于 perf/jsonl 日志携带协议与节点信息。 */
void logger_set_context(const char *app,
const char *proto,
const char *mode,
const char *role,
const char *self_id);
/* 记录一次发送/接收 */
void logger_on_send(size_t bytes);
void logger_on_recv(size_t bytes);