Struct asyncio::ip::V6Only
[−]
[src]
pub struct V6Only(_);
Socket option for get/set an IPv6 socket supports IPv6 communication only.
Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
Examples
Setting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = TcpListener::new(ctx, Tcp::v6()).unwrap(); soc.set_option(V6Only::new(true)).unwrap();
Getting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = TcpListener::new(ctx, Tcp::v6()).unwrap(); let opt: V6Only = soc.get_option().unwrap(); let is_set: bool = opt.get();
Methods
impl V6Only
[src]
Trait Implementations
impl Default for V6Only
[src]
impl Clone for V6Only
[src]
fn clone(&self) -> V6Only
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