Type Definition asyncio::ip::UdpSocket [] [src]

type UdpSocket = DgramSocket<Udp>;

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();