toml
[dependencies]
anevicon_core = "*"
(examples/minimal.rs
)
```rust
use std::net::UdpSocket;
use anevicon_core::{Tester, TestSummary};
fn main() { // Setup the socket connected to the example.com domain let socket = UdpSocket::bind("0.0.0.0:0").unwrap(); socket.connect("93.184.216.34:80").unwrap();
// Setup all the I/O vectors (messages) we want to send
let payload = &mut [
(0, "Generals gathered in their masses".as_bytes()),
(0, "Just like witches at black masses".as_bytes()),
(0, "Evil minds that plot destruction".as_bytes()),
(0, "Sorcerers of death's construction".as_bytes()),
];
// Send all the created messages using only one system call
let mut summary = TestSummary::default();
let mut tester = Tester::new(&socket, &mut summary);
println!(
"The total packets sent: {}, the total seconds passed: {}",
tester.send_multiple(payload).unwrap().packets_sent(),
summary.time_passed().as_secs()
);
}
```
This program simply sends four packets to http://example.com/. Now you can follow the official documentation to learn more about the anevicon_core
abstractions.