cocos2d-js
cocos2d-js copied to clipboard
Does jsb support socket.io now?
I saw some thread at the forum on December but what now? Is something changes? Unfortunately I'm don't find any information about this. I thinks support of socket.io is very important feature.
Yes, jsb supports socket.io. There is a sample in /js-tests/src/ExtensionsTest/NetworkTest/SocketIOTest.js
Thanks @joshuastray!
var SocketIO = SocketIO || window.io;
and external
require was a little confusing :)
@joshuastray how about secure
option? I see that if my socket.io
server running with SSL cetificates e. g. secure connection
over https
Cocos2d-JS Android app can't connect to him (Cocos2d-HTML5 can).
This is very important thing. Tell me please where I can check it. Thanks.
Yes, it is a known issue. The libwebsockets in frameworks/js-bindings/cocos2d-x/external
is built without OpenSSL support. Websockets in JSB also can't connect to wss.
https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/issues/27
@Joshuastray it's a very big issue. It's mean that my players from secure page can't play online with mobile players :(
I need to do some research hot to fix this.
@IgorMats Yes, I agree with you. Seems that they met problems when builing libwebsockets linked with OpenSSL. I am not sure about that, looking forward to your good news. Thank you!
The prebuilt libwebsockets comes from here:https://github.com/dumganhar/libwebsockets/tree/v1.23 Hopes that can help you.
I know this is a very old question, but is there any update on this please? I am having the same issue that my game can not connect to a secure url via socketIO on mobile. it works fine on web.