@@ -37,26 +37,26 @@ class WiFiUDP : public UDP, public SList<WiFiUDP> {
37
37
WiFiUDP (); // Constructor
38
38
WiFiUDP (const WiFiUDP& other);
39
39
WiFiUDP& operator =(const WiFiUDP& rhs);
40
- ~WiFiUDP ();
40
+ virtual ~WiFiUDP ();
41
41
42
42
operator bool () const { return _ctx != 0 ; }
43
43
44
44
// initialize, start listening on specified port.
45
45
// Returns 1 if successful, 0 if there are no sockets available to use
46
- virtual uint8_t begin (uint16_t port);
46
+ uint8_t begin (uint16_t port) override ;
47
47
// Finish with the UDP connetion
48
- virtual void stop ();
48
+ void stop () override ;
49
49
// join a multicast group and listen on the given port
50
50
uint8_t beginMulticast (IPAddress interfaceAddr, IPAddress multicast, uint16_t port);
51
51
52
52
// Sending UDP packets
53
53
54
54
// Start building up a packet to send to the remote host specific in ip and port
55
55
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
56
- virtual int beginPacket (IPAddress ip, uint16_t port);
56
+ int beginPacket (IPAddress ip, uint16_t port) override ;
57
57
// Start building up a packet to send to the remote host specific in host and port
58
58
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
59
- virtual int beginPacket (const char *host, uint16_t port);
59
+ int beginPacket (const char *host, uint16_t port) override ;
60
60
// Start building up a packet to send to the multicast address
61
61
// multicastAddress - muticast address to send to
62
62
// interfaceAddress - the local IP address of the interface that should be used
@@ -69,35 +69,35 @@ class WiFiUDP : public UDP, public SList<WiFiUDP> {
69
69
int ttl = 1 );
70
70
// Finish off this packet and send it
71
71
// Returns 1 if the packet was sent successfully, 0 if there was an error
72
- virtual int endPacket ();
72
+ int endPacket () override ;
73
73
// Write a single byte into the packet
74
- virtual size_t write (uint8_t );
74
+ size_t write (uint8_t ) override ;
75
75
// Write size bytes from buffer into the packet
76
- virtual size_t write (const uint8_t *buffer, size_t size);
76
+ size_t write (const uint8_t *buffer, size_t size) override ;
77
77
78
78
using Print::write;
79
79
80
80
// Start processing the next available incoming packet
81
81
// Returns the size of the packet in bytes, or 0 if no packets are available
82
- virtual int parsePacket ();
82
+ int parsePacket () override ;
83
83
// Number of bytes remaining in the current packet
84
- virtual int available ();
84
+ int available () override ;
85
85
// Read a single byte from the current packet
86
- virtual int read ();
86
+ int read () override ;
87
87
// Read up to len bytes from the current packet and place them into buffer
88
88
// Returns the number of bytes read, or 0 if none are available
89
- virtual int read (unsigned char * buffer, size_t len);
89
+ int read (unsigned char * buffer, size_t len) override ;
90
90
// Read up to len characters from the current packet and place them into buffer
91
91
// Returns the number of characters read, or 0 if none are available
92
- virtual int read (char * buffer, size_t len) { return read ((unsigned char *)buffer, len); };
92
+ int read (char * buffer, size_t len) override { return read ((unsigned char *)buffer, len); };
93
93
// Return the next byte from the current packet without moving on to the next byte
94
- virtual int peek ();
95
- virtual void flush (); // Finish reading the current packet
94
+ int peek () override ;
95
+ void flush () override ; // Finish reading the current packet
96
96
97
97
// Return the IP address of the host who sent the current incoming packet
98
- virtual IPAddress remoteIP () const ;
98
+ IPAddress remoteIP () const override ;
99
99
// Return the port of the host who sent the current incoming packet
100
- virtual uint16_t remotePort () const ;
100
+ uint16_t remotePort () const override ;
101
101
// Return the destination address for incoming packets,
102
102
// useful to distinguish multicast and ordinary packets
103
103
IPAddress destinationIP () const ;
0 commit comments