Commit 1761b4ee authored by nanamicat's avatar nanamicat

tcp

parent f38aacd1
Pipeline #41963 passed with stages
in 33 seconds
...@@ -67,6 +67,7 @@ fn main() -> Result<()> { ...@@ -67,6 +67,7 @@ fn main() -> Result<()> {
.filter(|&r| r.config.schema == Schema::TCP && r.config.dst_port == 0) .filter(|&r| r.config.schema == Schema::TCP && r.config.dst_port == 0)
.unique_by(|r| r.config.src_port) .unique_by(|r| r.config.src_port)
{ {
println!("listen on port {}", router.config.src_port);
let socket = router.listen_tcp().unwrap(); let socket = router.listen_tcp().unwrap();
s.spawn(move |s| { s.spawn(move |s| {
// listen 或 accept 出错直接 panic // listen 或 accept 出错直接 panic
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment