mdns: support service subtype

* Closes https://github.com/espressif/esp-idf/issues/5508
This commit is contained in:
Jiacheng Guo
2021-09-30 15:18:16 +08:00
parent 15b2985ff3
commit e7e8610f56
5 changed files with 226 additions and 39 deletions
@@ -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