diff options
author | open-trade <[email protected]> | 2020-03-11 02:20:45 +0800 |
---|---|---|
committer | open-trade <[email protected]> | 2020-03-11 02:20:45 +0800 |
commit | 5e5d8927e29922079211064d8cbb52767a2a6967 (patch) | |
tree | e1a37b46b27f77ef1f7091522b5790ba65d96c69 /src | |
parent | defac1f338573e705b890dd351d55dc7aa67b8dd (diff) | |
download | rustdesk-server-5e5d8927e29922079211064d8cbb52767a2a6967.tar.gz rustdesk-server-5e5d8927e29922079211064d8cbb52767a2a6967.zip |
test if udp/tcp share the same NAT port
Diffstat (limited to 'src')
-rw-r--r-- | src/rendezvous_server.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index d1adca4..989cca3 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -20,6 +20,15 @@ impl RendezvousServer { let mut rs = Self { peer_map: PeerMap::new(), }; + /* // used to test if udp/tcp share the same NAT port, yes in my test + let addr = addr.to_string(); + hbb_common::tokio::spawn(async { + let mut l = hbb_common::tokio::net::TcpListener::bind(addr).await.unwrap(); + while let Ok((_, addr)) = l.accept().await { + log::debug!("Tcp peer {:?}", addr); + } + }); + */ while let Some(Ok((bytes, addr))) = socket.next().await { rs.handle_msg(&bytes, addr, &mut socket).await?; } |