UdpSocket — blocking. tokio::UdpSocket — async.
UdpSocket:
tokio::UdpSocket:
1// Blocking2use std::net::UdpSocket;3let socket = UdpSocket::bind("127.0.0.1:8080")?;45// Async6use tokio::net::UdpSocket;7let socket = UdpSocket::bind("127.0.0.1:8080").await?;
Key: std for blocking, tokio for async.