Struct ublox_cellular::sockets::udp::UdpSocket [−][src]
Expand description
A User Datagram Protocol socket.
A UDP socket is bound to a specific endpoint, and owns transmit and receive packet buffers.
Implementations
Return the socket handle.
Return the bound endpoint.
pub fn should_update_available_data(&mut self, ts: Instant<CLK>) -> bool where
Generic<CLK::T>: TryInto<Milliseconds>,
pub fn closed_by_remote(&mut self, ts: Instant<CLK>) where
Generic<CLK::T>: TryInto<Milliseconds>,
Set available data.
Get the number of bytes available to ingress.
Bind the socket to the given endpoint.
This function returns Err(Error::Illegal)
if the socket was open
(see is_open), and Err(Error::Unaddressable)
if the port in the given endpoint is zero.
Dequeue a packet received from a remote endpoint, and return the endpoint as well as a pointer to the payload.
This function returns Err(Error::Exhausted)
if the receive buffer is empty.
Dequeue a packet received from a remote endpoint, copy the payload into the given slice, and return the amount of octets copied as well as the endpoint.
See also recv.
Peek at a packet received from a remote endpoint, and return the endpoint as well as a pointer to the payload without removing the packet from the receive buffer. This function otherwise behaves identically to recv.
It returns Err(Error::Exhausted)
if the receive buffer is empty.
Peek at a packet received from a remote endpoint, copy the payload into the given slice, and return the amount of octets copied as well as the endpoint without removing the packet from the receive buffer. This function otherwise behaves identically to recv_slice.
See also peek.