-
Notifications
You must be signed in to change notification settings - Fork 0
How to use Mochiweb and its websocket functionality?
Serge edited this page Sep 30, 2021
·
1 revision
The original application by Beebole requires all to refresh the browser to see the changes. It uses AJAX with HTTP get or post requests. I always wanted to add real time pushes to it, and it felt natural to use web sockets for that rather than the Comet' long poll approach.
- start the mochiweb web server
- initiate a websocket connection to it from the browser
- analyze the incoming request on the server
- initiate websocket session
- serve static files
- serve websocket request