Type Alias UdpSocketState

Source
pub type UdpSocketState<I, D, BT> = SocketState<I, D, Udp<BT>>;
Expand description

A UDP socket’s state.

Aliased Type§

enum UdpSocketState<I, D, BT> {
    Unbound(UnboundSocketState<I, D, Udp<BT>>),
    Bound(BoundSocketState<I, D, Udp<BT>>),
}

Variants§

§

Unbound(UnboundSocketState<I, D, Udp<BT>>)

§

Bound(BoundSocketState<I, D, Udp<BT>>)

Implementations

Source§

impl<I, D, S> SocketState<I, D, S>

Source

pub fn record_common_info<N>(&self, inspector: &mut N)

Record inspect information generic to each datagram protocol.

Source

pub fn get_options_device<'a, BC, CC>( &'a self, core_ctx: &mut CC, ) -> (&'a IpOptions<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, S>, &'a Option<<CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>)
where BC: DatagramBindingsTypes, CC: DatagramBoundStateContext<I, BC, S, WeakDeviceId = D>,

Gets the IpOptions and bound device for the socket state.

Trait Implementations

Source§

impl<I, D, S> AsRef<IpOptions<I, D, S>> for SocketState<I, D, S>

Source§

fn as_ref(&self) -> &IpOptions<I, D, S>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<I, D, S> Debug for SocketState<I, D, S>

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<I, D, S, IpType> GenericOverIp<IpType> for SocketState<I, D, S>

Source§

type Type = SocketState<IpType, D, S>

The type of Self when its IP-generic parameter is replaced with the type NewIp.