rust_mc_serv/src/main.rs
2025-05-16 10:05:00 +03:00

23 lines
320 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use inet::Server;
mod data;
mod inet;
mod cycle;
#[tokio::main]
async fn main() {
let Ok(server) = Server::new("127.0.0.1:25565").await else {
println!("Не удалось забиндить сервер");
return;
};
loop {
let stream = server.accept().await;
tokio::spawn(cycle::main(stream));
}
}