mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-05-19 16:10:38 +00:00
test if udp/tcp share the same NAT port
This commit is contained in:
Generated
+1
@@ -159,6 +159,7 @@ dependencies = [
|
|||||||
"env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"protobuf 2.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf 2.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"protobuf-codegen-pure 2.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf-codegen-pure 2.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|||||||
+1
-1
Submodule libs/hbb_common updated: 2cc3edf0f6...489ff10030
@@ -20,6 +20,15 @@ impl RendezvousServer {
|
|||||||
let mut rs = Self {
|
let mut rs = Self {
|
||||||
peer_map: PeerMap::new(),
|
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 {
|
while let Some(Ok((bytes, addr))) = socket.next().await {
|
||||||
rs.handle_msg(&bytes, addr, &mut socket).await?;
|
rs.handle_msg(&bytes, addr, &mut socket).await?;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user