Struct net2::UdpBuilder
[−]
[src]
pub struct UdpBuilder { // some fields omitted }
Methods
impl UdpBuilder
[src]
fn new_v4() -> Result<UdpBuilder>
Constructs a new UdpBuilder with the AF_INET
domain, the SOCK_DGRAM
type, and with a protocol argument of 0.
Note that passing other kinds of flags or arguments can be done through
the FromRaw{Fd,Socket}
implementation.
fn new_v6() -> Result<UdpBuilder>
Constructs a new UdpBuilder with the AF_INET6
domain, the SOCK_DGRAM
type, and with a protocol argument of 0.
Note that passing other kinds of flags or arguments can be done through
the FromRaw{Fd,Socket}
implementation.
fn bind<T>(&self, addr: T) -> Result<UdpSocket> where T: ToSocketAddrs
Binds this socket to the specified address.
This function directly corresponds to the bind(2) function on Windows and Unix.
impl UdpBuilder
[src]
fn ttl(&self, ttl: u32) -> Result<&Self>
fn only_v6(&self, only_v6: bool) -> Result<&Self>
fn reuse_address(&self, reuse: bool) -> Result<&Self>
Trait Implementations
impl FromRawFd for UdpBuilder
[src]
unsafe fn from_raw_fd(fd: c_int) -> UdpBuilder
Constructs a new instances of Self
from the given raw file descriptor. Read more