wip downloading (it doesnt work)

This commit is contained in:
Luuk van Oijen
2023-11-08 21:35:13 +01:00
parent ebc0dba4ef
commit 5011ae280c
9 changed files with 110 additions and 18 deletions

View File

@@ -73,6 +73,13 @@ impl RawPacket {
}
}
pub fn from_data(data: Vec<u8>) -> Self {
Self {
header: data.len() as u32,
data,
}
}
pub fn from_str(str_data: &str) -> Self {
let data = str_data.as_bytes().to_vec();
Self {