let socket = UdpSocket::bind("0.0.0.0:0").expect("couldn't bind to address");
socket.connect("255.255.255.255:0").expect("connect function failed");
I encountered a problem when trying to create a UDP broadcast tool under Ubuntu: "thread 'main' panicked at 'connect function failed: OS {Code: 13, kind: permissiondenied, message:" permission denied "}'"
But there is no problem with the same code under windows. I don't know if there is any difference between Ubuntu and windows
But this problem has tortured me for a day. I look forward to the help of the boss
I work as root