From 8e5e15471b40bd8d31e311216242619d7a7d04a8 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sun, 5 Dec 2021 20:16:47 +0000 Subject: [PATCH] wip --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index e0f70a2..9048a12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -140,6 +140,7 @@ fn server () -> Result <(), AppError> { socket.join_multicast_v4 (¶ms.multicast_addr, &([0u8, 0, 0, 0].into ())).unwrap (); loop { + println! ("Waiting for messages..."); let (req, remote_addr) = recv_msg_from (&socket)?; let resp = match req { @@ -159,6 +160,7 @@ fn recv_msg_from (socket: &UdpSocket) -> Result <(Message, SocketAddr), AppError { let mut buf = vec! [0u8; PACKET_SIZE]; let (bytes_recved, remote_addr) = socket.recv_from (&mut buf)?; + dbg! (remote_addr); buf.truncate (bytes_recved); let msg = Message::from_slice (&buf)?;