docs(networking): Adds examples references to documentation

This commit is contained in:
Euripedes Rocha Filho
2026-04-23 15:23:59 +02:00
parent 6b53a2362f
commit 2183c77afd
6 changed files with 21 additions and 13 deletions
+13 -1
View File
@@ -27,6 +27,8 @@ Some common lwIP app APIs are supported indirectly by ESP-IDF:
- Dynamic Host Configuration Protocol (DHCP) Server & Client are supported indirectly via the :doc:`/api-reference/network/esp_netif` functionality.
- Domain Name System (DNS) is supported in lwIP; DNS servers could be assigned automatically when acquiring a DHCP address, or manually configured using the :doc:`/api-reference/network/esp_netif` API.
For DNS over HTTPS, see :example:`protocols/dns_over_https`.
.. note::
DNS server configuration in lwIP is global, not interface-specific. If you are using multiple network interfaces with distinct DNS servers, exercise caution to prevent inadvertent overwrites of one interface's DNS settings when acquiring a DHCP lease from another interface.
@@ -75,6 +77,10 @@ A number of ESP-IDF examples show how to use the BSD Sockets APIs:
- :example:`protocols/sockets/tcp_client` demonstrates how to create a TCP client that connects to a server using a predefined IP address and port.
- :example:`protocols/sockets/tcp_transport_client` demonstrates how to create a TCP client with the ``tcp_transport`` component, including optional SOCKS proxy support.
- :example:`protocols/http_request` demonstrates a minimal HTTP request over a plain TCP socket using the BSD Sockets API.
- :example:`protocols/sockets/tcp_client_multi_net` demonstrates how to use Ethernet and Wi-Fi interfaces together, connect to both simultaneously, create a TCP client for each interface, and send a basic HTTP request and response.
- :example:`protocols/sockets/udp_server` demonstrates how to create a UDP server that receives client connection requests and data.
@@ -83,6 +89,12 @@ A number of ESP-IDF examples show how to use the BSD Sockets APIs:
- :example:`protocols/sockets/udp_multicast` demonstrates how to use the IPV4 and IPV6 UDP multicast features via the BSD-style sockets interface.
The :doc:`Ethernet driver </api-reference/network/esp_eth>` shows the same BSD socket and TCP/IP path over an EMAC-attached interface. Use these reference applications:
- :example:`ethernet/basic` for driver bring-up, ``esp_netif``, DHCP, and basic IP connectivity.
- :example:`ethernet/iperf` for TCP/UDP throughput measurement on Ethernet.
- :example:`ethernet/ptp` for IEEE 1588 / PTP time synchronization over Ethernet.
Supported Functions
^^^^^^^^^^^^^^^^^^^
@@ -559,7 +571,7 @@ TCP/IP performance is a complex subject, and performance can be optimized toward
Maximum Throughput
^^^^^^^^^^^^^^^^^^
Espressif tests ESP-IDF TCP/IP throughput using the iperf test application: https://iperf.fr/, please refer to :ref:`improve-network-speed` for more details about the actual testing and using the optimized configuration.
Espressif tests ESP-IDF TCP/IP throughput using the iperf test application: https://iperf.fr/, please refer to :ref:`improve-network-speed` for more details about the actual testing and using the optimized configuration. Reference iperf example projects are :example:`wifi/iperf` and :example:`ethernet/iperf`.
.. important::
@@ -114,6 +114,8 @@ Application Examples
- :example:`protocols/icmp_echo` demonstrates how to implement a simple ping command line utility to test if a remote host is reachable on the IP network, using ICMP echo request packets.
- :example:`protocols/icmp/pmtu_probe` demonstrates how to probe path MTU with ICMP echo requests and apply the result to the active interface using :cpp:func:`esp_netif_set_mtu`.
API Reference
-------------
@@ -176,6 +176,8 @@ Refer to the examples :example:`protocols/https_server/simple` (simple HTTPS ser
If you plan to use the Mbed TLS API directly, refer to the example :example:`protocols/https_mbedtls`. This example demonstrates how to establish an HTTPS connection using Mbed TLS by setting up a secure socket with a certificate bundle for verification.
The example :example:`protocols/smtp_client` sends email (including attachments) over SMTP with STARTTLS using the Mbed TLS APIs.
Important Config Options
------------------------
+2 -2
View File
@@ -26,13 +26,13 @@ Application Examples
Two reference examples are available in ESP-IDF:
- MQTT over TLS (certificate bundle): ``examples/protocols/mqtt``
- MQTT over TLS (certificate bundle): :example:`protocols/mqtt`
- Validates the broker with ESP-IDF's certificate bundle (default).
- Default broker URI targets ``mqtts://test.mosquitto.org:8886`` (Let's Encrypt chain).
- Alternative configuration pins Mosquitto CA and uses ``mqtts://test.mosquitto.org:8883``.
- MQTT 5.0 over TLS (certificate bundle): ``examples/protocols/mqtt5``
- MQTT 5.0 over TLS (certificate bundle): :example:`protocols/mqtt5`
- Uses MQTT v5.0 with TLS and validation via the certificate bundle.
- Default broker URI targets ``mqtts://test.mosquitto.org:8886``.
@@ -158,5 +158,5 @@ Breaking change: ESP-MQTT moved to a managed component and example set updated.
- Legacy MQTT TLS examples under ``examples/protocols/mqtt/ssl*`` were removed.
- New reference examples are available:
- ``examples/protocols/mqtt``: MQTT over TLS.
- ``examples/protocols/mqtt5``: MQTT v5.0 over TLS.
- :example:`protocols/mqtt`: MQTT over TLS.
- :example:`protocols/mqtt5`: MQTT v5.0 over TLS.