Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdns #55

Open
FedericoBusero opened this issue Apr 18, 2022 · 0 comments
Open

mdns #55

FedericoBusero opened this issue Apr 18, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@FedericoBusero
Copy link
Owner

FedericoBusero commented Apr 18, 2022

#ifdef USE_SOFTAP
#include <DNSServer.h>
DNSServer dnsServer;
#else
#if defined(ESP32)
#include <ESPmDNS.h>
#else
#include <ESP8266mDNS.h>
#endif
#endif

...

if (!MDNS.begin(host_name)) {
#ifdef DEBUG_SERIAL
DEBUG_SERIAL.println("Error starting mDNS");
#endif
return;
}

// Add service to MDNS-SD
MDNS.addService("http", "tcp", 80);
// TODO also add websocket ??

#endif // USE_SOFTAP

...
#if !defined(ESP32)
//We don't need to call this explicitly on ESP32 but we do on 8266
MDNS.update();
#endif

@FedericoBusero FedericoBusero added the enhancement New feature or request label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant