2#if defined(USE_ESP8266) && defined(USE_ARDUINO) && defined(USE_MDNS)
4#include <ESP8266mDNS.h>
14static void register_esp8266(MDNSComponent *, StaticVector<MDNSService, MDNS_SERVICE_COUNT> &services) {
17 for (
const auto &service : services) {
22 auto *proto = MDNS_STR_ARG(service.proto);
26 auto *service_type = MDNS_STR_ARG(service.service_type);
30 uint16_t port =
const_cast<TemplatableValue<uint16_t> &
>(service.port).value();
31 MDNS.addService(FPSTR(service_type), FPSTR(proto), port);
32 for (
const auto &record : service.txt_records) {
33 MDNS.addServiceTxt(FPSTR(service_type), FPSTR(proto), FPSTR(MDNS_STR_ARG(record.key)),
34 FPSTR(MDNS_STR_ARG(record.value)));
const std::string & get_name() const
Get the name of this Application set by pre_setup().
void on_shutdown() override
void setup_buffers_and_register_(PlatformRegisterFn platform_register)
void IRAM_ATTR HOT delay(uint32_t ms)
Application App
Global storage of Application pointer - only one Application can exist.
uint8_t progmem_read_byte(const uint8_t *addr)