lwIP - A Lightweight TCP/IP stack - Patches: patch #9525, httpd: add Websocket support
You are not allowed to post comments on this tracker with your current authentication level.
patch #9525: httpd: add Websocket support
Submitter: | Sakari Kapanen <flannelhead> | ||
Submitted: | Thu 21 Dec 2017 09:12:19 PM UTC | ||
Votes: | 1 | ||
Category: | apps | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None |
Jump to the original submission
Fri 06 May 2022 07:57:50 AM UTC, comment #17: |
Benjamin Esenwein <besenwein> |
Wed 09 Mar 2022 10:16:28 AM UTC, comment #16: I tested the patch and I found a memory leak. http_state_init(hs) can be called with hs->ws_state pointing to an allocated struct and if hs is resetted, this struct is never freed.
|
Jonathan D <jona> |
Fri 06 Sep 2019 01:52:24 PM UTC, comment #15: Hi, my apologies for the absence of reply. I unfortunately have not had sufficient time to work on this and the situation is probably not going to change any time soon (even if I would have liked to). So, if anyone desires to continue improving upon this patch, please feel free to pick it up.
|
Sakari Kapanen <flannelhead> |
Wed 09 Jan 2019 12:41:46 PM UTC, comment #14: Hi Sakari, any progress on the WebSocket support? Or, do you have any example full project that you can share? I am very interested in it. |
Afdhal Atiff Tan <afdhalatifftan> |
Mon 01 Oct 2018 01:16:24 PM UTC, comment #13: If you want something that resembles the raw tcp API, please create a new altcp layer. |
Simon Goldschmidt <goldsimon> |
Mon 01 Oct 2018 01:14:57 PM UTC, comment #12: Should the websocket API not resemble the Raw TCP API? I mean stuff like:
|
Lucas Hartmann <lhartmann> |
Mon 01 Oct 2018 07:14:09 AM UTC, comment #11: Hello Sakari,
|
Adam Baron <vysocan> |
Wed 28 Feb 2018 03:57:36 PM UTC, comment #10: Adjusted the summary as Dirk said he already pushed the strnicmp thing |
Simon Goldschmidt <goldsimon> |
Mon 29 Jan 2018 09:13:56 AM UTC, comment #9: Thanks, that seems like a fair assumption with good reasoning and indeed it makes maintenance easier. |
Sakari Kapanen <flannelhead> |
Mon 29 Jan 2018 09:12:14 AM UTC, comment #8: The best thing I can come up with is to just expect mbedtls is present. They provide everything we need and we don't need to implement things twice.
|
Simon Goldschmidt <goldsimon> |
Mon 29 Jan 2018 09:02:36 AM UTC, comment #7: Good to hear that. I'll follow up with a refactored patch and let's discuss it further then. :)
|
Sakari Kapanen <flannelhead> |
Mon 29 Jan 2018 08:39:47 AM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Mon 29 Jan 2018 08:33:09 AM UTC, comment #5: Simon, thank you for the feedback.
|
Sakari Kapanen <flannelhead> |
Mon 29 Jan 2018 06:35:24 AM UTC, comment #4: I really don't know if this fits. Anyway, a few generic comments:
|
Simon Goldschmidt <goldsimon> |
Mon 29 Jan 2018 05:39:39 AM UTC, comment #3: Simon is the httpd guy :-) |
Dirk Ziegelmeier <dziegel> |
Sun 28 Jan 2018 10:01:29 PM UTC, comment #2: dziegel: thanks for merging the fix. Have you yet had time to review the patch? Would you consider this feature appropriate for merging to upstream httpd? If there is anything I could do to help this get merged, I'm willing to do so. :) |
Sakari Kapanen <flannelhead> |
Sun 24 Dec 2017 12:14:10 PM UTC, comment #1: Pushed the fix for strnicmp in a modified version without side-effect in boolean expression |
Dirk Ziegelmeier <dziegel> |
Thu 21 Dec 2017 09:12:19 PM UTC, original submission:
This patch adds Websocket support to the httpd. The original work was done based on older lwIP by lujji: https://github.com/lujji/esp-httpd
|
Sakari Kapanen <flannelhead> |
Depends on the following items: None found
Items that depend on this one: None found
There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-10-01 | vysocan | Carbon-Copy | - | Added vysocan | |
2018-02-28 | goldsimon | Summary | httpd: add Websocket support, fix lwip_strnicmp | httpd: add Websocket support | |
2018-02-03 | goldsimon | Assigned to | goldsimon | None | |
2018-01-29 | dziegel | Assigned to | None | goldsimon | |
2017-12-21 | flannelhead | Attached File | - | Added 0001-httpd-integrate-Websocket-support.patch, #42700 |
Powered by Savane 3.13-02a9.
Corresponding source code
Hello Savannah Community,
In the last 6 months we (a team of 6 students from the Baden-Wuerttemberg Cooperative State University) have been working on lwIP and on a successful implementation of Sakari Kapanen’s WebSocket patch under lwIP.
In the process we had to clear some obstacles, which we want to outline briefly at this point to help other developers who will probably have similar problems.
Our project goal was:
Implement the WebSocket patch for lwIP on Windows 10. From this task we derived the following subgoals:
• Deploy lwIP on Windows 10
• Rework the patch from Sakari Kapanen
• Publish the implementation on GitHub/Savannah.
lwIP on Windows 10
This subgoal represented our first hurdle. The installation guides available on the internet for lwIP on Windows are all outdated and not applicable to the 2.1.0 patch. More up-to-date installation guides exist mainly for lwIP under Linux or for specific embedded systems.
After a brief exchange with Simon Goldschmidt over email in early 2022, we were able to set up lwIP on Windows 10 with his input. As a result of this process, we created an installation guide that we are hosting on GitHub for all to see: Installation Guide lwIP on Windows 10.
The patch by Sakari Kapanen
In December 2017, Sakari Kapanen released a patch for lwIP that implements the WebSocket protocol: Patch #9525. This patch was not implemented in the main branch of lwIP because it contains several bugs (e.g. missing software licenses for third party code, memory leak).
Our project task was to customize the WebSocket patch and successfully implement it in the Main Branch of lwIP.
The WebSocket patch by Sakari Kapanen does not work in our Windows development environment due to that opening a websocket connection inevitably leads to a "Run-Time Check Failure #2". This could be because of missing dependencies in the Windows environment.
Release of the implementation
Due to the problems presented here, we decided to change the project goal as we wanted to make our small contribution to the lwIP project. Instead of implementing the WebSocket patch, we extended lwIP with an OpenAPI specification for REST APIs. lwIP sends back a JSON string containing the lwIP server’s key data when connecting to the lwIP server. This is displayed via the http web server interface in the endpoint identification.
We hope that this small insight into our work of the last 6 months could make a small contribution to the further development of lwIP.