OVMS3-idf/examples/protocols/http_server/persistent_sockets
Anurag Kar e2da1d9905 http_server : Fix and enable example tests
This introduces the following changes in the example test scripts :
* Dependency on python requests library removed in favor of httplib
* Bug fixed in the logic responsible for receiving and processing http chunked responses
* Default timeouts increased Note : Due to connectivity issues (between runner host and DUT) in the runner environment, some of the advanced_tests are being ignored. These tests are intended for verifying the expected limits of the http_server capabilities, and implement sending and receiving of large HTTP packets and malformed requests, running multiple parallel sessions, etc. It is advised that all these tests be run locally, when making changes or adding new features to this component.
2018-08-30 03:01:59 +05:30
..
main ci: temp modify http server tests to get CI pass: 2018-07-27 23:38:20 +08:00
scripts Http Server : Add a simple light weight HTTP Server Component. 2018-07-20 15:49:17 +05:30
http_server_persistence_test.py http_server : Fix and enable example tests 2018-08-30 03:01:59 +05:30
Makefile Http Server : Add a simple light weight HTTP Server Component. 2018-07-20 15:49:17 +05:30
README.md Http Server : Add a simple light weight HTTP Server Component. 2018-07-20 15:49:17 +05:30

HTTPD Server Persistant Sockets Example

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

  • Configure the project using "make menuconfig" and goto :

    • Example Configuration ->
      1. WIFI SSID: WIFI network to which your PC is also connected to.
      2. WIFI Password: WIFI password
  • In order to test the HTTPD server persistent sockets demo :

    1. compile and burn the firmware "make flash"
    2. run "make 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.