From: Lizzy Fleckenstein Date: Wed, 15 Feb 2023 11:39:08 +0000 (+0100) Subject: Add check for unimplemented packet splitting X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=df3188d85034425c8a4d5d7658c84a808e615d19;p=mt_rudp.git Add check for unimplemented packet splitting --- diff --git a/src/send.rs b/src/send.rs index 741c542..0bbce47 100644 --- a/src/send.rs +++ b/src/send.rs @@ -51,6 +51,10 @@ impl RudpShare { } pub async fn send_raw(&self, data: &[u8]) -> io::Result<()> { + if data.len() > UDP_PKT_SIZE { + panic!("splitting packets is not implemented yet"); + } + self.udp_tx.send(data).await } }