This commit is contained in:
Stanislav N Mikhailov
2026-08-10 17:29:15 +03:00
parent e45b86cd20
commit 46f2721570
4 changed files with 21 additions and 17 deletions
+13 -8
View File
@@ -1,11 +1,16 @@
use tokio::{io, net::TcpStream, stream};
use tokio::{io::{self, AsyncReadExt}, net::TcpStream, stream};
use crate::protocol::Header;
pub async fn handle(
stream: &mut TcpStream,
header: Header,
) -> io::Result<()> {
println!("Обработчик UPLOAD получил заголовок: {header:?}");
Ok(())
}
struct UploadMetadata {
file_size: u64,
file_name: String,
}
impl UploadMetadata {
pub async fn handle(stream: &mut TcpStream, header: Header) -> io::Result<()> {
println!("Обработчик UPLOAD получил заголовок: {header:?}");
let filename_read=stream.read(&mut )
Ok(())
}
}