Struct asyncio::ip::UnicastHops
[−]
[src]
pub struct UnicastHops(_);
Socket option for time-to-live associated with outgoing unicast packets.
Implements the IPPROTO_IP/IP_UNICAST_TTL or IPPROTO_IPV6/IPV6_UNICAST_HOPS socket option.
Examples
Setting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = UdpSocket::new(ctx, Udp::v4()).unwrap(); soc.set_option(UnicastHops::new(4)).unwrap();
Getting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = UdpSocket::new(ctx, Udp::v4()).unwrap(); let opt: UnicastHops = soc.get_option().unwrap(); let hops: u8 = opt.get();
Methods
impl UnicastHops
[src]
Trait Implementations
impl Default for UnicastHops
[src]
fn default() -> UnicastHops
Returns the "default value" for a type. Read more
impl Clone for UnicastHops
[src]
fn clone(&self) -> UnicastHops
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more