why does multicast quit working on my laptop after a while?
parent
8e5e15471b
commit
570458c72c
|
@ -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 (¶ms.multicast_addr, &([0u8, 0, 0, 0].into ())).unwrap ();
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
socket.join_multicast_v4 (¶ms.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)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue