nodemcu-firmware icon indicating copy to clipboard operation
nodemcu-firmware copied to clipboard

Working version of the websocket support

Open pjsg opened this issue 3 years ago • 5 comments

Fixes #<GITHUB_ISSUE_NUMBER>.

  • [x] This PR is for the dev branch rather than for the release branch.
  • [x] This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • [x] I have thoroughly tested my contribution.
  • [x] The code changes are reflected in the documentation at docs/*.

This is the websocket enhancement to the httpd implementation. Unfortunately, it doesn't actually work due to a bug in the IDF, but there is a fix, and I'm hopeful that it will get merged soon. https://github.com/espressif/esp-idf/issues/8596

pjsg avatar Apr 30 '22 23:04 pjsg

It still has debugging statement that I will remove once it works well.

pjsg avatar Apr 30 '22 23:04 pjsg

I'm having problems in deciding what the lifetime of the ws object should be. I suspect that it isn't right at the moment. It deserves more thought.

pjsg avatar Apr 30 '22 23:04 pjsg

Any further thoughts on the ws object lifetime? Is the current state good enough?

jmattsson avatar Jan 30 '24 01:01 jmattsson

After more thought, I've fixed the lifetime problems. Also I got rid of a memory leak. This is good to go.

pjsg avatar Feb 02 '24 01:02 pjsg

This turned out to be more effort than I'd expected, so I'm glad you tackled it instead of me :D

I haven't tried it out or done an in-depth code review, but if you reckon it's ready to go, I'm happy to go with that. I left one comment about the docs that you might want to check before merging, but other than that, it'd be good to get this functionality in!

jmattsson avatar Feb 02 '24 03:02 jmattsson