use tokio::net::TcpListener;
#[tokio::main]
async fn main() {
let listener = TcpLIstener::bind("192.168.30.106:5678").await.unwrap();
loop {
let (stream, _) = listener.accept().await.unwrap();
// Now process the data
}
}
This code runs without problem. But the thing is that I cannot connect to this server. And even worse ss -ta doesn't show anything on this port.
What might the problem be?
One of the first tools I reach for is nmap whenever I'm having issues connecting to a particular port. You would do something like nmap 192.168.30.106 and it'll scan that computer to see which ports are open.
If you can ping the machine but are unable to connect to that specific port, chances are your firewall rules are blocking things.