cocos2d-js
cocos2d-js copied to clipboard
secure websocket connection doesn't work
I try to secure websocket connection via modify WebSocketTest in js-tests ws://echo.websocket.org
=> wss://echo.websocket.org
.
I compile with original test ws://echo.websocket.org
and install on android simulator 4.3. Everything works well. But compiling with wss://echo.websocket.org
, it fires error and can't connect to server.
Is there any missing config when making secure connection?
Thanks for your report.That does not work. I will check it later.
If you have fixed it, a pull request will be so nice. Thank you. :)
Has anyone managed to get secure web sockets working? I'm attempting to integrate Firebase into my game and it requires WSS.
The libwebsockets in Cocos2d-JS(actually comes from Cocos2d-x) is prebuilt without OpenSSL support, so it does not work with wss. You can try to built it with OpenSSL yourself. An potential problem is that the libcurl is static linked with OpenSSL too, so maybe it will cause the problem of redefining symbols.
Yeah I realised that after asking last night. Do you know if there are instructions anywhere on compiling libwebsockets for iOS and Android? I have been trying all day to get it working but so far it has been relatively painful.
Sorry I have no idea about that now.
No worries. I'll keep plugging away and see how I go.
Firebase is great. It makes multiplayer games very easy. I would also love to see the support of it in cocos2d-js.