Skip to content

Commit a0bb4e6

Browse files
committed
Add virtual beginMulticast(...) stub to UDP class
1 parent 2daba3b commit a0bb4e6

File tree

2 files changed

+4
-2
lines changed
  • hardware/arduino

2 files changed

+4
-2
lines changed

hardware/arduino/avr/cores/arduino/Udp.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
class UDP : public Stream {
4242

4343
public:
44-
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
44+
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
45+
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
4546
virtual void stop() =0; // Finish with the UDP socket
4647

4748
// Sending UDP packets

hardware/arduino/sam/cores/arduino/Udp.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
class UDP : public Stream {
4242

4343
public:
44-
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
44+
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
45+
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
4546
virtual void stop() =0; // Finish with the UDP socket
4647

4748
// Sending UDP packets

0 commit comments

Comments
 (0)