omorandi / tiws

a very simple Titanium module (iOS / Android) for creating native websockets
131 stars 63 forks source link

No https connection with socket.io #38

Open ottopic opened 7 years ago

ottopic commented 7 years ago

I'm using http connection and all works fine. Now on server have activated https on socket but in the app it don't works. I don't receive any error of connection and I don't understand the problem.

` io.connect(myHttpsUrl, {

'reconnection' : true, 'reconnectionDelay' : 500, transports : ["websocket"] }); `

I tried with param secure : true too. Can you help me?

ottopic commented 7 years ago

I have update socket.io.js and now it return the error The certificate for this server is invalid. You might be connecting to a server that is pretending to be ...

Is there param to accept auto signed certificate?

ottopic commented 7 years ago

I have installed new certificate not self signed and now I have not more certificate error but

[INFO] : error!"{"code":0,"message":"Transport unknown"}" [INFO] : error!"HTTP error"

coming back to my first socket.io.js now all works fine. With your last socket.io.js my script doesn't works, why?

In attachments the two files

Socket.io.js.zip