mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 10:17:30 +02:00
fix(mdns): updated the document to clarify service advertisment prerequisite (IDFGH-6982)
This commit is contained in:
@ -39,7 +39,7 @@ Example method to start mDNS for the STA interface and set ``hostname`` and ``de
|
|||||||
mDNS Services
|
mDNS Services
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
mDNS can advertise information about network services that your device offers. Each service is defined by a few properties. (Please note Self-querying names is not supported in Espressif's mDNS library, a deliberate design choice to simplify implementation, preventing local network pollution and addressing WiFi multicast behavior)
|
mDNS can advertise information about network services that your device offers. Each service is defined by a few properties.
|
||||||
|
|
||||||
* ``instance_name``: friendly name for your service, like ``Jhon's E{IDF_TARGET_NAME} Web Server``. If not defined, ``default_instance`` will be used.
|
* ``instance_name``: friendly name for your service, like ``Jhon's E{IDF_TARGET_NAME} Web Server``. If not defined, ``default_instance`` will be used.
|
||||||
* ``service_type``: (required) service type, prepended with underscore. Some common types can be found `here <http://www.dns-sd.org/serviceTypes.html>`_.
|
* ``service_type``: (required) service type, prepended with underscore. Some common types can be found `here <http://www.dns-sd.org/serviceTypes.html>`_.
|
||||||
@ -47,6 +47,10 @@ mDNS can advertise information about network services that your device offers. E
|
|||||||
* ``port``: (required) network port that the service runs on
|
* ``port``: (required) network port that the service runs on
|
||||||
* ``txt``: ``{var, val}`` array of strings, used to define properties for your service
|
* ``txt``: ``{var, val}`` array of strings, used to define properties for your service
|
||||||
|
|
||||||
|
Please note:
|
||||||
|
1. Self-querying names is not supported in Espressif's mDNS library, a deliberate design choice to simplify implementation, preventing local network pollution and addressing WiFi multicast behavior)
|
||||||
|
2. Setting your own hostname is a prerequisite(mandatory) for advertising services or delegating other names.
|
||||||
|
|
||||||
Example method to add a few services and different properties::
|
Example method to add a few services and different properties::
|
||||||
|
|
||||||
void add_mdns_services()
|
void add_mdns_services()
|
||||||
|
Reference in New Issue
Block a user