mdns: allow mutiple instances with same service type

This commit is contained in:
Jiacheng Guo
2021-09-13 19:33:02 +08:00
parent b59902f4d1
commit b7a99f4658
4 changed files with 99 additions and 11 deletions

View File

@@ -53,6 +53,9 @@ static void initialise_mdns(void)
//initialize service
ESP_ERROR_CHECK( mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData, 3) );
#if CONFIG_MDNS_MULTIPLE_INSTANCE
ESP_ERROR_CHECK( mdns_service_add("ESP32-WebServer1", "_http", "_tcp", 80, NULL, 0) );
#endif
#if CONFIG_MDNS_PUBLISH_DELEGATE_HOST
char *delegated_hostname;