Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Ethernet UDP.beginPacket reference

Open SurferTim opened this issue 12 years ago • 3 comments

The ethernet UDP.beginPacket function reference is incorrect. It shows beginPacket does not return a value, when in fact it does. This is from EthernetUdp.h

// Start building up a packet to send to the remote host specific in ip and port // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port virtual int beginPacket(IPAddress ip, uint16_t port);

http://arduino.cc/en/Reference/EthernetUDPBeginPacket

SurferTim avatar Nov 17 '14 12:11 SurferTim

This also holds for endPacket, as reported in #2452

The ethernet UDP.endPacket reference is incorrect. It shows endPacket does not return a value, when in fact it does. This is from EthernetUdp.h

// Finish off this packet and send it
// Returns 1 if the packet was sent successfully, 0 if there was an error
virtual int endPacket();

http://arduino.cc/en/Reference/EthernetUDPEndPacket

matthijskooijman avatar Nov 17 '14 12:11 matthijskooijman

Thanks! I didn't know if they would be separate issues or not. Next time I'll know better.

SurferTim avatar Nov 17 '14 12:11 SurferTim

Fixed

sngl avatar Nov 24 '14 11:11 sngl