Angus Gratton 438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 6 年之前
..
main 003a9872b7 esp_wifi: wifi support new event mechanism 6 年之前
scripts 57c54f96f1 examples: Fix Python coding style 7 年之前
CMakeLists.txt 25ab8380c8 ci: support to build esp32s2beta simple examples 6 年之前
Makefile a5b0f5d6ed examples/protocols/http(s)_server: use common network component 6 年之前
README.md 47bbb107a8 build system: Use CMake-based build system as default when describing commands 6 年之前
http_server_persistence_test.py 63329b169b ci: limit example test to ESP32s 6 年之前

README.md

HTTPD Server Persistent Sockets Example

The Example consists of HTTPD server persistent sockets demo. This sort of persistency enables the server to have independent sessions/contexts per client.

  • Open the project configuration menu (idf.py menuconfig) to configure Wi-Fi or Ethernet. See "Establishing Wi-Fi or Ethernet Connection" section in examples/protocols/README.md for more details.

  • In order to test the HTTPD server persistent sockets demo :

    1. compile and burn the firmware idf.py -p PORT flash
    2. run idf.py -p PORT monitor and note down the IP assigned to your ESP module. The default port is 80
    3. run the test script "python2 scripts/adder.py <IP> <port> <N>"
      • the provided test script sends (POST) numbers from 1 to N to the server which has a URI POST handler for adding these numbers into an accumulator that is valid throughout the lifetime of the connection socket, hence persistent
      • the script does a GET before closing and displays the final value of the accumulator

See the README.md file in the upper level 'examples' directory for more information about examples.