After adding #include "external/websockets/include/ios/libwebsockets.h"
to WebSocket.h, i can build libjscocos2d.
But new errors occur when running cocos gen-libs
/Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.cpp:473:16: error: out-of-line definition of
'onSocketCallback' does not match any declaration in 'cocos2d::network::WebSocket'
int WebSocket::onSocketCallback(struct lws *wsi,
^~~~~~~~~~~~~~~~
/Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.cpp:562:23: error: assigning to
'enum lws_write_protocol' from incompatible type 'int'
writeProtocol |= LWS_WRITE_NO_FIN;
^ ~~~~~~~~~~~~~~~~
/Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.cpp:568:41: error: assigning to
'enum lws_write_protocol' from incompatible type 'int'
writeProtocol |= LWS_WRITE_NO_FIN;
^ ~~~~~~~~~~~~~~~~
/Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.cpp:642:44: error: use of undeclared identifier
'libwebsockets_remaining_packet_payload'; did you mean 'lws_remaining_packet_payload'?
_pendingFrameDataLen = libwebsockets_remaining_packet_payload (wsi);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lws_remaining_packet_payload
In file included from /Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.cpp:30:
In file included from /Applications/Cocos/frameworks/cocos2d-x-3.8.1/cocos/network/WebSocket.h:45:
/Applications/Cocos/frameworks/cocos2d-x-3.8.1/build/../external/websockets/include/ios/libwebsockets.h:1613:1: note:
'lws_remaining_packet_payload' declared here
lws_remaining_packet_payload(struct lws *wsi);
^
4 errors generated.
It there any guide on how to solve IPv6 for Cocos2d-JS v3.8.1?