OVMS3-idf/examples/protocols/http_server/persistent_sockets
He Yin Ling c906e2afee test: update example and unit tests with new import roles:
tiny_test_fw is a python package now. import it using normal way.
2019-12-07 10:34:54 +08:00
..
main examples: protocol examples which use common connection component 2019-11-13 12:36:25 +01:00
CMakeLists.txt protocol examples: enable protocol examples for esp32sbeta 2019-11-01 11:14:10 +08:00
http_server_persistence_test.py test: update example and unit tests with new import roles: 2019-12-07 10:34:54 +08:00
Makefile examples/protocols/http(s)_server: use common network component 2019-04-15 03:32:05 +00:00
README.md build system: Use CMake-based build system as default when describing commands 2019-07-08 17:31:27 +10: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 "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.