cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
7.16k stars 1.83k forks source link

Upgrade libwebsockets to v4 #13995

Open pandamicro opened 1 year ago

pandamicro commented 1 year ago

We have been using libwebsockets v2.4 version as a library, it is using LGPL license with a Static Linking Exception license, so the static linking exception license is applied for us. But we notice that libwebsockets 4.0 have changed their base license to MIT which will be more aligned with Cocos engine's MIT license.

So it need to be evaluated for a version upgrade.

@minggo please assign this task for v3.7.1

mmyduckx commented 1 year ago

I compiled libweboskcets v4 for windows and android to do some test work. And I found that some interfaces used in engine alreadly removed like lws_libuv_stop, lws_uv_initloop, lws_libuv_run,LWS_CALLBACK_CHILD_WRITE_VIA_PARENT, etc. 企业微信截图_46a0bd20-2432-4d47-a314-77802b46bf3b 企业微信截图_d7dc4f10-95ef-4af5-ade6-1c8b17faaea4 Some of struct like lws_context_creation_info also changed their attribute usage. 企业微信截图_30124487-a6a8-4621-aa71-d7d0a41a80d6 So if we want to updrade libwebsockets to v4, refactor is necessary, which may be risky in small version like 3.7.x @pandamicro @minggo

minggo commented 1 year ago

Ok, let's move it to v3.8.

mmyduckx commented 1 year ago

Temporary insertion tasks (adaptation of WeChat applets, splashScreen refactoring, lots of legacy videoplay issues, etc.) affect the scheduling. And there is a certain risk in refactoring, so it will be moved to Next milestone.