mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add mdns_remove_service
This commit is contained in:
parent
e7fc913dd7
commit
82fd2c930a
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
|
#include <mdns.h>
|
||||||
#elif defined(ARDUINO_ARCH_ESP8266)
|
#elif defined(ARDUINO_ARCH_ESP8266)
|
||||||
#include <ESP8266mDNS.h>
|
#include <ESP8266mDNS.h>
|
||||||
// MDNSResponder::hMDNSService hMDNSService;
|
// 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)
|
IRAM_ATTR void mdnsLoop(void)
|
||||||
{
|
{
|
||||||
#if defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP8266)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user