Struct mio::udp::UdpSocket
[−]
[src]
pub struct UdpSocket { /* fields omitted */ }
Methods
impl UdpSocket
[src]
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<()>
Trait Implementations
impl Debug for UdpSocket
[src]
impl Evented for UdpSocket
[src]
fn register(
&self,
selector: &mut Selector,
token: Token,
interest: EventSet,
opts: PollOpt
) -> Result<()>
&self,
selector: &mut Selector,
token: Token,
interest: EventSet,
opts: PollOpt
) -> Result<()>
fn reregister(
&self,
selector: &mut Selector,
token: Token,
interest: EventSet,
opts: PollOpt
) -> Result<()>
&self,
selector: &mut Selector,
token: Token,
interest: EventSet,
opts: PollOpt
) -> Result<()>
fn deregister(&self, selector: &mut Selector) -> Result<()>
impl From<UdpSocket> for UdpSocket
[src]
impl AsRawFd for UdpSocket
[src]
impl FromRawFd for UdpSocket
[src]
unsafe fn from_raw_fd(fd: RawFd) -> UdpSocket
Constructs a new instance of Self
from the given raw file descriptor. Read more