A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/cap-net-ext/latest/cap_net_ext/trait.UdpSocketExt.html below:

UdpSocketExt in cap_net_ext - Rust

pub trait UdpSocketExt: Sealed + Sized {
    // Required method
    fn new(address_family: AddressFamily, blocking: Blocking) -> Result<Self>;
}
Expand description

A trait for extending UdpSocket types.

Source

Creates a new UdpSocket with the given address family.

The created socket is initially not bound or connected to any address. Use PoolExt::bind_existing_udp_socket to bind it, or PoolExt::connect_existing_udp_socket to initiate a connection.

This is similar to Pool::bind_udp_socket in that it creates a UDP socket, however it does not perform the bind. And, it has a blocking argument to select blocking or non-blocking mode for the created socket.

And it’s similar to Pool::connect_udp_socket in that it creates a UDP socket, however it does not perform the connect step. And, it has a blocking argument to select blocking or non-blocking mode for the created socket.

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Source§

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4