Struct mio::udp::UdpSocket
[−]
[src]
pub struct UdpSocket { // some fields omitted }
Methods
impl UdpSocket
fn v4() -> Result<UdpSocket>
Returns a new, unbound, non-blocking, IPv4 UDP socket
fn v6() -> Result<UdpSocket>
Returns a new, unbound, non-blocking, IPv6 UDP socket
fn bound(addr: &SocketAddr) -> Result<UdpSocket>
fn bind(&self, addr: &SocketAddr) -> Result<()>
fn local_addr(&self) -> Result<SocketAddr>
fn try_clone(&self) -> Result<UdpSocket>
fn send_to(&self, buf: &[u8], target: &SocketAddr) -> Result<Option<usize>>
fn recv_from(&self, buf: &mut [u8]) -> Result<Option<(usize, SocketAddr)>>
fn set_broadcast(&self, on: bool) -> Result<()>
fn set_multicast_loop(&self, on: bool) -> Result<()>
fn join_multicast(&self, multi: &IpAddr) -> Result<()>
fn leave_multicast(&self, multi: &IpAddr) -> Result<()>
fn set_multicast_time_to_live(&self, ttl: i32) -> Result<()>
impl UdpSocket
fn v4() -> Result<UdpSocket>
Returns a new, unbound, non-blocking, IPv4 UDP socket
fn v6() -> Result<UdpSocket>
Returns a new, unbound, non-blocking, IPv6 UDP socket