52#define UDP_TX_PACKET_MAX_SIZE 24
83 virtual uint8_t
begin(uint16_t);
100 virtual uint8_t
begin(IPAddress, uint16_t,
bool multicast =
false);
130 virtual int beginPacket(IPAddress ip, uint16_t port);
143 virtual int beginPacket(
const char *host, uint16_t port);
159 virtual size_t write(uint8_t);
170 virtual size_t write(
const uint8_t *buffer,
size_t size);
207 virtual int read(
unsigned char *buffer,
size_t len);
217 virtual int read(
char *buffer,
size_t len)
219 return read((
unsigned char *)buffer, len);
232 virtual void flush();
Definition EthernetUdp.h:54
EthernetUDP()
Constructs an EthernetUDP object without opening a socket.
Definition EthernetUdp.cpp:43
virtual int read()
Reads one byte from the current packet.
Definition EthernetUdp.cpp:200
virtual int available()
Returns the number of unread bytes in the current packet.
Definition EthernetUdp.cpp:96
virtual void onDataArrival(std::function< void()> onDataArrival_fn)
Registers a callback invoked when a UDP datagram arrives.
virtual int beginPacket(IPAddress ip, uint16_t port)
Sets the destination for the next outgoing packet.
Definition EthernetUdp.cpp:128
virtual int parsePacket()
Advances to the next received packet.
Definition EthernetUdp.cpp:177
virtual uint16_t remotePort()
Returns the port of the sender of the current packet.
Definition EthernetUdp.h:252
virtual int endPacket()
Sends the data written since beginPacket() as one datagram.
Definition EthernetUdp.cpp:143
virtual IPAddress remoteIP()
Returns the IP address of the sender of the current packet.
Definition EthernetUdp.h:241
virtual int peek()
Returns the next byte of the current packet without consuming it.
Definition EthernetUdp.cpp:248
virtual void stop()
Closes the UDP socket.
Definition EthernetUdp.cpp:101
virtual uint8_t beginMulticast(IPAddress, uint16_t)
Opens a UDP socket that joins a multicast group.
Definition EthernetUdp.cpp:266
uint16_t _remaining
Definition EthernetUdp.h:66
virtual uint8_t begin(uint16_t)
Opens a unicast UDP socket on a local port.
Definition EthernetUdp.cpp:48
virtual void flush()
Intended to wait for the transmit buffer to empty.
Definition EthernetUdp.cpp:261
virtual int read(char *buffer, size_t len)
Reads up to len characters from the current packet into buffer.
Definition EthernetUdp.h:217
virtual size_t write(uint8_t)
Appends one byte to the outgoing packet.
Definition EthernetUdp.cpp:161
Include stm32_eth source files.
Definition stm32_eth.h:68