mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-20 22:12:27 +02:00
mdns: add remove delegate host api
* Original commit: espressif/esp-idf@2174693096
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
1eb5df9780
commit
c8821199a2
@ -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