RecvBBFrame

Trait RecvBBFrame 

Source
pub trait RecvBBFrame {
    // Required method
    fn recv_bbframe(&mut self, buf: &mut [u8; 7338]) -> Result<usize>;
}
Expand description

Receiver of complete BBFRAMEs.

This trait is modeled around UdpSocket::recv_from, since the main way to receive complete BBFRAMEs is as jumbo datagrams received from a UDP socket.

The BBFRAMEs may or may not have padding at the end. The recv_fragment function is allowed to skip suppyling some complete BBFRAMEs, which happens for instance if UDP packets are lost (when this trait is implemented by a UDP socket).

Required Methods§

Source

fn recv_bbframe(&mut self, buf: &mut [u8; 7338]) -> Result<usize>

Receives a single fragment into the buffer. On success, returns the number of bytes read.

The function is called with a byte array buf of sufficient size to hold the message bytes.

Implementations on Foreign Types§

Source§

impl RecvBBFrame for UdpSocket

Source§

fn recv_bbframe(&mut self, buf: &mut [u8; 7338]) -> Result<usize>

Implementors§

Source§

impl<F> RecvBBFrame for F
where F: FnMut(&mut [u8; 7338]) -> Result<usize>,