why does multicast quit working on my laptop after a while?

main
_ 2021-12-05 20:21:11 +00:00
parent 8e5e15471b
commit 570458c72c
1 changed files with 1 additions and 2 deletions

View File

@ -137,9 +137,8 @@ fn server () -> Result <(), AppError> {
let params = CommonParams::default (); let params = CommonParams::default ();
let socket = UdpSocket::bind (SocketAddrV4::new (Ipv4Addr::UNSPECIFIED, params.server_port)).unwrap (); let socket = UdpSocket::bind (SocketAddrV4::new (Ipv4Addr::UNSPECIFIED, params.server_port)).unwrap ();
socket.join_multicast_v4 (&params.multicast_addr, &([0u8, 0, 0, 0].into ())).unwrap ();
loop { loop {
socket.join_multicast_v4 (&params.multicast_addr, &([0u8, 0, 0, 0].into ())).unwrap ();
println! ("Waiting for messages..."); println! ("Waiting for messages...");
let (req, remote_addr) = recv_msg_from (&socket)?; let (req, remote_addr) = recv_msg_from (&socket)?;