diff --git a/kubi-udp/src/server.rs b/kubi-udp/src/server.rs index fce125d..fe78696 100644 --- a/kubi-udp/src/server.rs +++ b/kubi-udp/src/server.rs @@ -58,8 +58,14 @@ impl Server { } pub fn update(&mut self) { let mut buf = Vec::new(); - if self.socket.recv(&mut buf).is_ok() { - todo!() + loop { + if self.socket.recv(&mut buf).is_ok() { + todo!() + } else { + break + } + buf.clear() } + } }