Skip to content

Commit e6670a4

Browse files
Added implementation for getting service name
1 parent c41c8f0 commit e6670a4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: libraries/ESPmDNS/src/ESPmDNS.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ String MDNSResponder::hostname(int idx) {
299299
return String(result->hostname);
300300
}
301301

302+
String MDNSResponder::instanceName(int idx) {
303+
mdns_result_t *result = _getResult(idx);
304+
if (!result) {
305+
log_e("Result %d not found", idx);
306+
return String();
307+
}
308+
return String(result->instance_name);
309+
}
310+
311+
302312
IPAddress MDNSResponder::address(int idx) {
303313
mdns_result_t *result = _getResult(idx);
304314
if (!result) {

0 commit comments

Comments
 (0)