fix: 重构基础通信框架为异步事件循环,并修复 KCP conv 错位与接收漏斗堵塞问题

This commit is contained in:
meiqi
2026-03-13 21:00:38 +08:00
parent cf629fa722
commit 4d475f8c92
4 changed files with 251 additions and 211 deletions

View File

@@ -96,6 +96,9 @@ ssize_t omni_send(OmniContext *ctx, const void *buf, size_t len)
}
logger_log("DEBUG", "network", "omni_send proto=%d bytes=%zd call_ms=%llu",
(int)ctx->proto, n, (unsigned long long)(t1 - t0));
if (n > 0) {
logger_print_performance_log("on_send");
}
return n;
}
@@ -114,6 +117,9 @@ ssize_t omni_recv(OmniContext *ctx, void *buf, size_t len)
}
logger_log("DEBUG", "network", "omni_recv proto=%d bytes=%zd call_ms=%llu",
(int)ctx->proto, n, (unsigned long long)(t1 - t0));
if (n > 0) {
logger_print_performance_log("on_recv");
}
return n;
}
@@ -126,4 +132,3 @@ void omni_close(OmniContext *ctx)
logger_print_performance_log("final");
free(ctx);
}