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]

Returns the "default value" for a type. Read more

impl Clone for V6Only
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<P: IpProtocol> SocketOption<P> for V6Only
[src]

impl<P: IpProtocol> GetSocketOption<P> for V6Only
[src]

impl<P: IpProtocol> SetSocketOption<P> for V6Only
[src]