As the title says... Chat on...

User avatar
By Godzil
#69794 You can have a look at what nodemcu-webide (using httpserver) is doing: https://github.com/moononournation/node ... socket.lua

This version use httpserver as a backend (for mainly the first connection step, all the websocket itself is handeld by that file)

You can also look at the original file (by creationix) : https://github.com/creationix/nodemcu-w ... socket.lua
(but I can't say for sure if it works well)

At least it can give an idea on how to do it
User avatar
By Godzil
#69855 I'm not sure to understand.

Both I gave you are websocket server implementation in lua, and at least the first one work (as I tested it) but I'm sure that the second work too.

There is a "websocket" module for NodeMCU firmware, but it is client only, there is no server module, if you want one, you will have to make it and I don't think it would be accepted in the official firmware (but I may be wrong)

The implementation made in lua works, so why it does not fulfils your needs?