lpsanoy_lenvov f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
..
web f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
Makefile f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
README.md f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
appweb.conf f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
echo.c f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos
start.me f0ec0a6345 上传工具以及库文件 %!s(int64=2) %!d(string=hai) anos

README.md

ESP WebSockets Sample

This sample shows how to create a WebSockets echo server. This application echos incoming packets back to the client. The application source is in echo.c. This is a simple ESP controler with one action that is run in response to the URI:

/ws/test/echo

The HTML page web/index.html is served to the client browser to issue a web socket request.

The server is configured to keep the web socket open for 1 minute of inactivity and then close the connection.

Requirements

To build:

make

To run:

make run

The server listens on port 8080. Browse to:

 http://localhost:8080/

This opens a web socket and sends the message "Hello Server" to the server. The server responds by echoing back the message. After one minute of inactivity, the server will close the connection.

Code:

  • Makefile - Makefile build instructions
  • cache - Directory for compiled ESP modules
  • appweb.conf - Appweb server configuration file
  • echo.c - WebSockets echo server code
  • web - Directory containing the index.html web page

Documentation:

See Also: