mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Add mdns_remove_service
This commit is contained in:
parent
e7fc913dd7
commit
82fd2c930a
@ -6,6 +6,7 @@
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
#include <ESPmDNS.h>
|
||||
#include <mdns.h>
|
||||
#elif defined(ARDUINO_ARCH_ESP8266)
|
||||
#include <ESP8266mDNS.h>
|
||||
// MDNSResponder::hMDNSService hMDNSService;
|
||||
@ -77,6 +78,17 @@ void mdnsStart()
|
||||
}
|
||||
}
|
||||
|
||||
bool mdns_remove_service(char* service, char* proto)
|
||||
{
|
||||
#if ESP32
|
||||
return mdns_service_remove("_arduino", "_tcp") == ESP_OK;
|
||||
#endif
|
||||
|
||||
#if ESP8266
|
||||
return MDNS.removeService(haspDevice.get_hostname(),"_arduino", "_tcp");
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR void mdnsLoop(void)
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
|
Loading…
x
Reference in New Issue
Block a user