EasyManua.ls Logo

Espressif ESP32-S2 - Page 626

Espressif ESP32-S2
1695 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
proto: service protocol (_tcp, _udp)
txt: array of TXT data (eg. {{var,val},{other,2}})
num_items: number of items in TXT data
esp_err_t mdns_service_txt_set_for_host(const char *service_type, const char *proto,
const char *hostname, mdns_txt_item_t txt[],
uint8_t num_items)
Replace all TXT items for service with hostname.
Note The value length of txt items will be automatically decided by strlen
Return
ESP_OK success
ESP_ERR_INVALID_ARG Parameter error
ESP_ERR_NOT_FOUND Service not found
ESP_ERR_NO_MEM memory error
Parameters
service_type: service type (_http, _ftp, etc)
proto: service protocol (_tcp, _udp)
hostname: service hostname. If NULL, local hostname will be used.
txt: array of TXT data (eg. {{var,val},{other,2}})
num_items: number of items in TXT data
esp_err_t mdns_service_txt_item_set(const char *service_type, const char *proto, const
char *key, const char *value)
Set/Add TXT item for service TXT record.
Note The value length will be automatically decided by strlen
Return
ESP_OK success
ESP_ERR_INVALID_ARG Parameter error
ESP_ERR_NOT_FOUND Service not found
ESP_ERR_NO_MEM memory error
Parameters
service_type: service type (_http, _ftp, etc)
proto: service protocol (_tcp, _udp)
key: the key that you want to add/update
value: the new value of the key
esp_err_t mdns_service_txt_item_set_with_explicit_value_len(const char
*service_type, const
char *proto, const
char *key, const
char *value, uint8_t
value_len)
Set/Add TXT item for service TXT record.
Return
ESP_OK success
ESP_ERR_INVALID_ARG Parameter error
ESP_ERR_NOT_FOUND Service not found
ESP_ERR_NO_MEM memory error
Parameters
service_type: service type (_http, _ftp, etc)
proto: service protocol (_tcp, _udp)
key: the key that you want to add/update
value: the new value of the key
value_len: the length of the value
esp_err_t mdns_service_txt_item_set_for_host(const char *service_type, const char
*proto, const char *hostname, const char
*key, const char *value)
Set/Add TXT item for service TXT record with hostname.
Espressif Systems 615
Submit Document Feedback
Release v4.4

Table of Contents