xiehang ee2b8a65a0 esp_wifi: Modify ESP_IF_WIFI_STA to WIFI_IF_STA 5 лет назад
..
main ee2b8a65a0 esp_wifi: Modify ESP_IF_WIFI_STA to WIFI_IF_STA 4 лет назад
scripts 57c54f96f1 examples: Fix Python coding style 7 лет назад
CMakeLists.txt d9939cedd9 cmake: make main a component again 7 лет назад
Makefile 656bef7bb7 Http Server : Add a simple light weight HTTP Server Component. 7 лет назад
README.md 656bef7bb7 Http Server : Add a simple light weight HTTP Server Component. 7 лет назад
http_server_persistence_test.py 4ca2b149e5 examples, tools: Fix Python3 deprecation warning for the imp module 7 лет назад

README.md

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.