correct error message when binding failed
This commit is contained in:
parent
286edefcb3
commit
e065ddc21b
@ -36,7 +36,7 @@ fn main() {
|
||||
let filename = "data.bin";
|
||||
|
||||
let local_addr: SocketAddr = "0.0.0.0:0".parse().expect("Failed to parse address");
|
||||
let socket = UdpSocket::bind(local_addr).expect("Failed to bind socket to port 26000");
|
||||
let socket = UdpSocket::bind(local_addr).expect("Failed to bind socket");
|
||||
|
||||
socket.set_read_timeout(Some(std::time::Duration::new(timeout, 0))).expect("set_read_timeout call failed");
|
||||
//socket.set_nonblocking(true).expect("set_nonblocking call failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user