feat: 真实连接链路、移除虚拟数据、全量打包脚本

This commit is contained in:
tongtong committed 2026-11-26 21:39:10 +08:00
1 parent 31b9a52eb4
commit 34340f4126
16 files changed
+601 -204

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
//! 运行本机 demo 服务,供 Android 被控端反连测试。
//! cargo run --example demo_server
use std::thread;
use std::time::Duration;
use ttstdconnect_core::demo_server;
fn main() {
demo_server::start(41001, 41000, 41002).expect("启动 demo 服务失败");
println!("demo server listening: TCP 41001, UDP 41000/41002");
loop {
thread::sleep(Duration::from_secs(1));
let status = demo_server::status();
if !status.events.is_empty() {
for event in &status.events {
println!("[event] {}", event);
}
// 事件会累积,这里只打印最新一批后清空显示(服务内部保留全部)。
std::io::Write::flush(&mut std::io::stdout()).ok();
}
thread::sleep(Duration::from_secs(2));
}
}