Struct rotor::mio::udp::UdpSocket [] [src]

pub struct UdpSocket {
    // some fields omitted
}

Methods

impl UdpSocket

fn v4() -> Result<UdpSocket, Error>

Returns a new, unbound, non-blocking, IPv4 UDP socket

fn v6() -> Result<UdpSocket, Error>

Returns a new, unbound, non-blocking, IPv6 UDP socket

fn bound(addr: &SocketAddr) -> Result<UdpSocket, Error>

fn bind(&self, addr: &SocketAddr) -> Result<(), Error>

fn local_addr(&self) -> Result<SocketAddr, Error>

fn try_clone(&self) -> Result<UdpSocket, Error>

fn send_to(&self, buf: &[u8], target: &SocketAddr) -> Result<Option<usize>, Error>

fn recv_from(&self, buf: &mut [u8]) -> Result<Option<(usize, SocketAddr)>, Error>

fn set_broadcast(&self, on: bool) -> Result<(), Error>

fn set_multicast_loop(&self, on: bool) -> Result<(), Error>

fn join_multicast(&self, multi: &IpAddr) -> Result<(), Error>

fn leave_multicast(&self, multi: &IpAddr) -> Result<(), Error>

fn set_multicast_time_to_live(&self, ttl: i32) -> Result<(), Error>

Trait Implementations

impl FromRawFd for UdpSocket

unsafe fn from_raw_fd(fd: i32) -> UdpSocket

impl AsRawFd for UdpSocket

fn as_raw_fd(&self) -> i32

impl From<UdpSocket> for UdpSocket

fn from(sys: UdpSocket) -> UdpSocket

impl Evented for UdpSocket

fn register(&self, selector: &mut Selector, token: Token, interest: EventSet, opts: PollOpt) -> Result<(), Error>

fn reregister(&self, selector: &mut Selector, token: Token, interest: EventSet, opts: PollOpt) -> Result<(), Error>

fn deregister(&self, selector: &mut Selector) -> Result<(), Error>

Derived Implementations

impl Debug for UdpSocket

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>