mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
16 lines
385 B
Rust
16 lines
385 B
Rust
fn main() {
|
|
for iface in &ifaces {
|
|
match iface.addr {
|
|
get_if_addrs::IfAddr::V4(ref addr) => {
|
|
match addr.broadcast {
|
|
Some(ip) => {
|
|
sock.send_to(&buf, (ip, 8765)).expect("foobar");
|
|
}
|
|
_ => ()
|
|
}
|
|
}
|
|
_ => ()
|
|
};
|
|
}
|
|
}
|