mdns: support service subtype

* Closes https://github.com/espressif/esp-idf/issues/5508


* Original commit: espressif/esp-idf@e7e8610f56
This commit is contained in:
Jiacheng Guo
2021-09-30 15:18:16 +08:00
committed by suren-gabrielyan-espressif
parent 38b4fe2353
commit fd8499c874
4 changed files with 226 additions and 37 deletions

View File

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