namespace stuff
{
void function(unsigned int number_a,
unsigned int number_b,
unsigned int number_c,
unsigned int number_d,
unsigned int number_e,
unsigned int number_f)
{
// something
}
}
use std::net::UdpSocket;
fn main() -> std::io::Result<()> {
{
let mut socket = UdpSocket::bind("127.0.0.1:34254")?;
// Receives a single datagram message on the socket. If `buf` is too small to hold
// the message, it will be cut off.
let mut buf = [0; 10];
let (amt, src) = socket.recv_from(&mut buf)?;
// Redeclare `buf` as slice of the received data and send reverse data back to origin.
let buf = &mut buf[..amt];
buf.reverse();
socket.send_to(buf, &src)?;
} // the socket is closed here
Ok(())
}
rust is more or less like c++.parallelStream().filter()
are actually quite niceIterator
trait in crate std
.b94fbc9
Add 50 β¬ donation by Im 'corneum (Message: Bruder Gib Admin PW) - def-