esp-idf/examples/protocols/http_server/persistent_sockets
He Yin Ling a908174c06 test: remove fake binary size check in example test:
the binary size check in example test was removed long time ago. Now we
have updated ttfw_idf to raise exception when performance standard is
not found. These fake performance check will be regarded as error.
Remove them now.
2020-11-24 17:53:33 +08:00
..
main Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
CMakeLists.txt Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
http_server_persistence_test.py test: remove fake binary size check in example test: 2020-11-24 17:53:33 +08:00
Makefile Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
README.md Docs: Encourage to used Python 3 2020-02-24 12:55:55 +01:00

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 "python 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.