mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-25 21:28:20 -06:00
server
This commit is contained in:
parent
2544386417
commit
6922c7635e
|
@ -1,3 +1,14 @@
|
||||||
fn main() {
|
use kubi_udp::server::{Server, ServerConfig};
|
||||||
|
use kubi_shared::networking::messages::{ClientToServerMessage, ServerToClientMessage};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
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:?}")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue