Skip to content

Commit 0003846

Browse files
committed
MDNS support for ESP 3.0.1
1 parent ac12ecb commit 0003846

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SnapClient.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ class SnapClient {
177177
// we just take the first address
178178
int nrOfServices = MDNS.queryService("snapcast", "tcp");
179179
if (nrOfServices > 0) {
180+
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
181+
server_ip = MDNS.address(0);
182+
#else
180183
server_ip = MDNS.IP(0);
184+
#endif
181185
char str_address[20] = {0};
182186
sprintf(str_address, "%d.%d.%d.%d", server_ip[0], server_ip[1],
183187
server_ip[2], server_ip[3]);

0 commit comments

Comments
 (0)