You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiUdp.h
+10-9
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,8 @@ namespace arduino {
33
33
classWiFiUDP : publicUDP {
34
34
private:
35
35
UDPSocket _socket; // Mbed OS socket
36
-
constchar *_host; // Host to be used to send data (todo: switch to SocketAddress)
37
-
uint16_t _port; //Port to be used to send data (^)
36
+
SocketAddress _host; // Host to be used to send data
37
+
SocketAddress _remoteHost; //Remote host that sent incoming packets
38
38
39
39
uint8_t* _packet_buffer; // Raw packet buffer (contains data we got from the UDPSocket)
40
40
@@ -45,15 +45,16 @@ class WiFiUDP : public UDP {
45
45
46
46
public:
47
47
WiFiUDP(); // Constructor
48
+
~WiFiUDP();
48
49
virtualuint8_tbegin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
49
-
//virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
50
+
virtualuint8_tbeginMulticast(IPAddress, uint16_t); // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
50
51
virtualvoidstop(); // Finish with the UDP socket
51
52
52
53
// Sending UDP packets
53
54
54
55
// Start building up a packet to send to the remote host specific in ip and port
55
56
// 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);
0 commit comments