pub type UdpSocket = DgramSocket<Udp>;
Expand description
The UDP socket type.
§Examples
Constructs a UDP socket.
use asyncio::IoContext;
use asyncio::ip::{IpProtocol, Udp, UdpSocket};
let ctx = &IoContext::new().unwrap();
let udp4 = UdpSocket::new(ctx, Udp::v4()).unwrap();
let udp6 = UdpSocket::new(ctx, Udp::v6()).unwrap();
Aliased Type§
pub struct UdpSocket { /* private fields */ }