mirror of
https://gitea.farpn.net/w1cdn/farpn_udp_server.git
synced 2025-10-13 13:08:42 -05:00
Change suggested by cargo build.
This commit is contained in:
@ -4,7 +4,7 @@ use std::net::UdpSocket;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let socket_result: Result<UdpSocket, std::io::Error> = UdpSocket::bind("127.0.0.1:7878");
|
||||
let mut socket: UdpSocket = match socket_result {
|
||||
let socket: UdpSocket = match socket_result {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
println!("Failed to bind socket: {}", e);
|
||||
@ -28,7 +28,6 @@ fn main() -> std::io::Result<()> {
|
||||
String::from_utf8_lossy(&buffer[..bytes_received])
|
||||
);
|
||||
|
||||
|
||||
// Echo the data back to the client
|
||||
socket.send_to(&buffer[..bytes_received], src_addr)?;
|
||||
}
|
||||
|
Reference in New Issue
Block a user