lpsanoy_lenvov f0ec0a6345 上传工具以及库文件 před 2 roky
..
web f0ec0a6345 上传工具以及库文件 před 2 roky
Makefile f0ec0a6345 上传工具以及库文件 před 2 roky
README.md f0ec0a6345 上传工具以及库文件 před 2 roky
appweb.conf f0ec0a6345 上传工具以及库文件 před 2 roky
chat.c f0ec0a6345 上传工具以及库文件 před 2 roky
esp.json f0ec0a6345 上传工具以及库文件 před 2 roky
load.es f0ec0a6345 上传工具以及库文件 před 2 roky
start.me f0ec0a6345 上传工具以及库文件 před 2 roky

README.md

ESP WebSockets Chat Sample

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

/ws/test/chat

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 10 minutes 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 any messages entered into the text field to all clients.

Code:

  • Makefile - Makefile build instructions
  • cache - Directory for compiled ESP modules
  • appweb.conf - Appweb server configuration file
  • chat.c - WebSockets chat server code
  • load.es - Ejscript test load program
  • web - Directory containing the index.html web page

Documentation:

See Also: