code beautifying
This commit is contained in:
parent
968035e2c9
commit
d5cd57261e
1 changed files with 4 additions and 3 deletions
|
@ -121,7 +121,9 @@ fn main() -> std::io::Result<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
let socket = UdpSocket::bind("0.0.0.0:7373")?;
|
let socket = UdpSocket::bind("0.0.0.0:7373")?;
|
||||||
socket.set_read_timeout(Some(core::time::Duration::from_secs(KEEPALIVE))).expect("Could not set read timeout");
|
socket
|
||||||
|
.set_read_timeout(Some(core::time::Duration::from_secs(KEEPALIVE)))
|
||||||
|
.expect("Could not set read timeout");
|
||||||
|
|
||||||
debug!("Morserino chat server started.");
|
debug!("Morserino chat server started.");
|
||||||
|
|
||||||
|
@ -140,10 +142,9 @@ fn main() -> std::io::Result<()> {
|
||||||
socket.send_to(b"", rec.0).unwrap();
|
socket.send_to(b"", rec.0).unwrap();
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let client_addr = src_addr.to_string();
|
let client_addr = src_addr.to_string();
|
||||||
let speed = buf[1] >> 2;
|
let speed = buf[1] >> 2;
|
||||||
let data = &buf[0..number_of_bytes];
|
let data = &buf[0..number_of_bytes];
|
||||||
|
|
Loading…
Reference in a new issue