1 2 3 4 5 6 7 8
use std::io::Write; use std::net::TcpStream; pub fn send(data: &[u8]) -> Result<(), std::io::Error> { let mut stream = TcpStream::connect(env!("send_to"))?; let _ = stream.write(data)?; Ok(()) }