kubi/kubi-server/src/main.rs

15 lines
412 B
Rust
Raw Normal View History

2023-02-10 13:26:03 -06:00
use kubi_udp::server::{Server, ServerConfig};
use kubi_shared::networking::messages::{ClientToServerMessage, ServerToClientMessage};
2023-01-29 18:46:22 -06:00
fn main() {
2023-02-10 13:26:03 -06:00
let mut server: Server<ServerToClientMessage, ClientToServerMessage> = Server::bind(
"0.0.0.0:1234".parse().unwrap(),
ServerConfig::default()
).unwrap();
loop {
if let Err(or) = server.update() {
println!("Server error: {or:?}")
}
}
2023-01-29 18:46:22 -06:00
}