allocation optimization and in place crypt

This commit is contained in:
2026-06-05 00:22:38 +07:00
parent 6cd4d001ad
commit 05696a836a
10 changed files with 234 additions and 183 deletions
+2 -9
View File
@@ -54,15 +54,8 @@ impl RawCastFrame {
Self::new(protocol, RawCastEvent::Connect, id, ip, port, Bytes::new())
}
pub fn data(protocol: LocalProtocol, id: u64, ip: Ipv4Addr, port: u16, data: Vec<u8>) -> Self {
Self::new(
protocol,
RawCastEvent::Data,
id,
ip,
port,
Bytes::from(data),
)
pub fn data(protocol: LocalProtocol, id: u64, ip: Ipv4Addr, port: u16, data: Bytes) -> Self {
Self::new(protocol, RawCastEvent::Data, id, ip, port, data)
}
pub fn close(protocol: LocalProtocol, id: u64, ip: Ipv4Addr, port: u16) -> Self {