capsules_extra::net::udp::udp_recv

Trait UDPRecvClient

Source
pub trait UDPRecvClient {
    // Required method
    fn receive(
        &self,
        src_addr: IPAddr,
        dst_addr: IPAddr,
        src_port: u16,
        dst_port: u16,
        payload: &[u8],
    );
}
Expand description

Client interface trait to receive UDP packets.

Intended to received packets passed up the network stack to the UDPReceiver, and then distributes them to userland applications from there. Kernel apps can also instantiate structs that implement this trait in order to receive UDP packets

Required Methods§

Source

fn receive( &self, src_addr: IPAddr, dst_addr: IPAddr, src_port: u16, dst_port: u16, payload: &[u8], )

Implementors§

Source§

impl UDPRecvClient for UDPDriver<'_>

Source§

impl<'a, A: Alarm<'a>> UDPRecvClient for MockUdp<'a, A>

Source§

impl<'a, A: Alarm<'a>> UDPRecvClient for ThreadNetworkDriver<'a, A>