mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 20:20:55 +03:00
Initial commit
This commit is contained in:
9
src/bin/server.rs
Normal file
9
src/bin/server.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use std::{net::UdpSocket, thread, time::Duration};
|
||||
|
||||
fn main() {
|
||||
let socket = UdpSocket::bind("127.0.0.1:42070").expect("couldn't bind to address");
|
||||
loop {
|
||||
socket.send_to(&[0; 0], "127.0.0.1:42069").expect("couldn't send data");
|
||||
thread::sleep(Duration::from_millis(1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user