EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #630 background imageLoading...
Page #630 background image
Chapter 2. API Reference
instance_name: service instance name
service_type: service type (_http, _arduino, _ftp etc.)
proto: service protocol (_tcp, _udp, etc.)
timeout: time in milliseconds to wait for answer.
result: pointer to the result of the query
esp_err_t mdns_query_a(const char *host_name, uint32_t timeout, esp_ip4_addr_t *addr)
Query mDNS for A record.
Return
ESP_OK success
ESP_ERR_INVALID_STATE mDNS is not running
ESP_ERR_NO_MEM memory error
ESP_ERR_INVALID_ARG parameter error
Parameters
host_name: host name to look for
timeout: time in milliseconds to wait for answer.
addr: pointer to the resulting IP4 address
esp_err_t mdns_query_aaaa(const char *host_name, uint32_t timeout, esp_ip6_addr_t *addr)
Query mDNS for A record.
Please note that hostname must not contain domain name, as mDNS uses .localdomain.
Return
ESP_OK success
ESP_ERR_INVALID_STATE mDNS is not running
ESP_ERR_NO_MEM memory error
ESP_ERR_INVALID_ARG parameter error
Parameters
host_name: host name to look for
timeout: time in milliseconds to wait for answer. If 0, max_results needs to be defined
addr: pointer to the resulting IP6 address
esp_err_t mdns_handle_system_event(void *ctx, system_event_t *event)
System event handler This method controls the service state on all active interfaces and applications are required
to call it from the system event handler for normal operation of mDNS service.
Please note that hostname must not contain domain name, as mDNS uses .localdomain.
Parameters
ctx: The system event context
event: The system event
Structures
struct mdns_txt_item_t
mDNS basic text item structure Used in mdns_service_add()
Public Members
const char *key
item key name
const char *value
item value string
struct mdns_ip_addr_s
mDNS query linked list IP item
Espressif Systems 619
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish