[−][src]Trait w5500::Udp
UDP trait that defines send and receive methods for UDP packets
Associated Types
type Error
Required methods
fn receive(
&mut self,
target_buffer: &mut [u8]
) -> Result<Option<(IpAddress, u16, usize)>, Self::Error>
&mut self,
target_buffer: &mut [u8]
) -> Result<Option<(IpAddress, u16, usize)>, Self::Error>
fn blocking_send(
&mut self,
host: &IpAddress,
host_port: u16,
data: &[u8]
) -> Result<(), Self::Error>
&mut self,
host: &IpAddress,
host_port: u16,
data: &[u8]
) -> Result<(), Self::Error>
Implementors
impl<'_, '_, '_, '_, ChipSelect: OutputPin, Spi: FullDuplex<u8>> Udp for (&'_ mut ActiveW5500<'_, '_, ChipSelect, Spi>, &'_ UdpSocket)
[src]
type Error = TransferError<Spi::Error, ChipSelect::Error>
fn receive(
&mut self,
destination: &mut [u8]
) -> Result<Option<(IpAddress, u16, usize)>, Self::Error>
[src]
&mut self,
destination: &mut [u8]
) -> Result<Option<(IpAddress, u16, usize)>, Self::Error>
Returns a UDP packet if one is available. Will return None
if no UDP packets are in the
socket's buffer
fn blocking_send(
&mut self,
host: &IpAddress,
host_port: u16,
data: &[u8]
) -> Result<(), Self::Error>
[src]
&mut self,
host: &IpAddress,
host_port: u16,
data: &[u8]
) -> Result<(), Self::Error>
Sends a UDP packet to the specified IP and port, and blocks until it is fully sent