forked from espressif/esp-protocols
mdns: add remove delegate host api
* Original commit: espressif/esp-idf@2174693096
This commit is contained in:
1 parent
1eb5df9780
commit
c8821199a2
4 files changed
+85
No files matched your search
@@ -187,10 +187,16 @@ static void mdns_example_task(void *pvParameters)
|
||||
query_mdns_host_with_gethostbyname("tinytester-lwip.local");
|
||||
query_mdns_host_with_getaddrinfo("tinytester-lwip.local");
|
||||
#endif
|
||||
bool removed = false;
|
||||
|
||||
while (1) {
|
||||
check_button();
|
||||
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||
if (pdTICKS_TO_MS(xTaskGetTickCount()) >= 15 * 1000 && ! removed) {
|
||||
printf("Remove device\n");
|
||||
ESP_ERROR_CHECK(mdns_delegate_hostname_remove("test-device"));
|
||||
removed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user