Skip to main content

UdpReceiveBindingsContext

Trait UdpReceiveBindingsContext 

Source
pub trait UdpReceiveBindingsContext<I: IpExt, D: StrongDeviceIdentifier>: UdpBindingsTypes {
    // Required methods
    fn receive_udp(
        &mut self,
        id: &UdpSocketId<I, D::Weak, Self>,
        device_id: &D,
        meta: UdpPacketMeta<I>,
        body: &[u8],
    ) -> Result<(), ReceiveUdpError>;
    fn on_socket_error(
        &mut self,
        id: &UdpSocketId<I, D::Weak, Self>,
        err: PendingDatagramSocketError,
    );
}
Expand description

The bindings context handling received UDP frames.

Required Methods§

Source

fn receive_udp( &mut self, id: &UdpSocketId<I, D::Weak, Self>, device_id: &D, meta: UdpPacketMeta<I>, body: &[u8], ) -> Result<(), ReceiveUdpError>

Receives a UDP packet on a socket.

Source

fn on_socket_error( &mut self, id: &UdpSocketId<I, D::Weak, Self>, err: PendingDatagramSocketError, )

Notifies Bindings that an error was set on a socket.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§