pub fn send(&mut self, size: usize) -> Result<&mut [u8]> {
        let packet_buf = self.tx_buffer.enqueue_one_with(|buf| buf.resize(size))?;
        net_trace!("{}:{}:{}: buffer to send {} octets",
                   self.meta.handle, self.ip_version, self.ip_protocol,
                   packet_buf.size);
        Ok(packet_buf.as_mut())
    }
/// Enqueue a packet to send, and return a pointer to its payload.
///
/// This function returns `Err(Error::Exhausted)` if the size is greater than
/// the transmit packet buffer size.
///
/// If the buffer is filled in a way that does not match the socket's
/// IP version or protocol, the packet will be silently dropped.
///
/// **Note:** The IP header is parsed and reserialized, and may not match
/// the header actually transmitted bit for bit.
Enqueue a packet to send, and return a pointer to its payload.
This function returns `Err(Error::Exhausted)` if the size is greater than
the transmit packet buffer size.

If the buffer is filled in a way that does not match the socket's
IP version or protocol, the packet will be silently dropped.

The IP header is parsed and reserialized, and may not match
the header actually transmitted bit for bit.
Enqueue a packet to send and return a pointer to its payload . This function returns ` Err ( Error :: Exhausted ) ` if the size is greater than the transmit packet buffer size . If the buffer is filled in a way that does not match the socket ' s IP version or protocol the packet will be silently dropped . The IP header is parsed and reserialized and may not match the header actually transmitted bit for bit .
pub fn send(&mut self, size: usize) -> Result<&mut [u8]> {
        let packet_buf = self.tx_buffer.enqueue_one_with(|buf| buf.resize(size))?;
        net_trace!("{}:{}:{}: buffer to send {} octets",
                   self.meta.handle, self.ip_version, self.ip_protocol,
                   packet_buf.size);
        Ok(packet_buf.as_mut())
    }
pub fn send ( & mut self , size : usize ) -> Result < & mut [ u8 ] > { let packet_buf = self . tx_buffer . enqueue_one_with ( | buf | buf . resize ( size ) ) ? ; net_trace ! ( " " self meta handle self ip_version self ip_protocol packet_buf size ) ; Ok ( packet_buf . as_mut ( ) ) }
Enqueue a packet to send, and return a pointer to its payload.
Enqueue a packet to send and return a pointer to its payload .
&mut self
size
usize
&mut self
size
usize