query metod is now working on server

This commit is contained in:
2025-07-25 17:50:38 +02:00
parent 3e4f722b12
commit 7cb9b6619d
4 changed files with 26 additions and 9 deletions
+3
View File
@@ -1,5 +1,7 @@
mod net;
use std::{net::UdpSocket, process::exit, sync::Arc};
use rsa::pkcs8::der::zeroize::Zeroize;
fn main() -> std::io::Result<()> {
{
let socket: Arc<UdpSocket> = Arc::new(
@@ -19,6 +21,7 @@ fn main() -> std::io::Result<()> {
let mut buf: [u8; pea_2_pea::BUFFER_SIZE] = [0; pea_2_pea::BUFFER_SIZE];
smol::block_on(async {
loop {
buf.zeroize();
match socket.recv_from(&mut buf) {
Ok((data_length, src)) => {
smol::spawn(net::handle_request(