| 2 |
raymond |
1 |
## esp-fs-webserver
|
|
|
2 |
This example is the most advanced since now.
|
|
|
3 |
|
|
|
4 |
With the help of WebSocket technology, we can send message from server-to-clients or from client-to-server in a **full-duplex communication channels over a single TCP connection.**
|
|
|
5 |
|
|
|
6 |
We use the **WebSocket client** to populate asynchronously an _"area chart"_ with real time datas from ESP regarding the **total size of heap memory** and size of **max contiguous block of memory**.
|
|
|
7 |
|
|
|
8 |
Off course, on the ESP MCU we will run also a WebSocket server together to the web server.
|
|
|
9 |
I've used this library [arduinoWebSockets](https://github.com/Links2004/arduinoWebSockets), so it is needed to compile, but you can choose which you prefer.
|
|
|
10 |
|
|
|
11 |
>N.B.
|
|
|
12 |
This example will run only if an internet connection is available because [Highcharts](https://www.highcharts.com/) Javascript resources is necessary
|
|
|
13 |
(to run offline in AP mode, you can download all the used js files, put it in the flash memory (better if gzipped to speed-up page loading) and edit the [index.htm](https://github.com/cotestatnt/esp-fs-webserver/blob/main/examples/highcharts/data/index.htm))
|
|
|
14 |
|
|
|
15 |
In this example, web page CSS and JavaScript source file is stored in a separated file inside the folder **/app**
|
|
|
16 |
|
|
|
17 |

|