• Home
  • Raw
  • Download

Lines Matching +full:ipv6 +full:- +full:single +full:- +full:target

3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
17 //! cross-platform utilities. It is up to the user to know how to use sockets
30 //! # fn main() -> std::io::Result<()> {
35 //! let socket = Socket::new(Domain::IPV6, Type::STREAM, None)?;
50 //! This crate has a single feature `all`, which enables all functions even ones
78 $(#[$target: meta])*
86 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
89 $(#[$target])*
104 fn from(socket: $from) -> $for {
127 compile_error!("Socket2 doesn't support the compile target");
148 /// as [`Domain::IPV4`], [`Domain::IPV6`], etc, are provided to avoid reaching
160 /// Domain for IPv6 communication, corresponding to `AF_INET6`.
161 pub const IPV6: Domain = Domain(sys::AF_INET6); constant
164 pub const fn for_address(address: SocketAddr) -> Domain { in for_address()
167 SocketAddr::V6(_) => Domain::IPV6, in for_address()
173 fn from(d: c_int) -> Domain { in from()
179 fn from(d: Domain) -> c_int { in from()
219 fn from(t: c_int) -> Type { in from()
225 fn from(t: Type) -> c_int { in from()
255 fn from(p: c_int) -> Protocol { in from()
261 fn from(p: Protocol) -> c_int { in from()
278 /// This flag is only used for datagram-based sockets,
283 pub const fn is_truncated(self) -> bool { in is_truncated()
295 fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()
306 pub fn new(buf: &'a mut [MaybeUninit<u8>]) -> MaybeUninitSlice<'a> { in new()
312 type Target = [MaybeUninit<u8>]; typedef
314 fn deref(&self) -> &[MaybeUninit<u8>] { in deref()
320 fn deref_mut(&mut self) -> &mut [MaybeUninit<u8>] { in deref_mut()
345 pub const fn new() -> TcpKeepalive { in new()
369 /// Some platforms specify this value in seconds, so sub-second
371 pub const fn with_time(self, time: Duration) -> Self { in with_time()
383 /// Some platforms specify this value in seconds, so sub-second
416 pub const fn with_interval(self, interval: Duration) -> Self { in with_interval()
457 pub const fn with_retries(self, retries: u32) -> Self { in with_retries()