I'm developing a chat application with HTTPS. This is the Socket.IO I've used
Server
First of all I developed the server with node.js and node module "socket.io": "^1.4.5"
In the server I have this:
var secure = {
ca: fs.readFileSync('ca.pem'),
key: fs.readFileSync('key.key'),
cert: fs.readFileSync('cert.crt')
};
var server = https.createServer(secure, app);
var io = require('socket.io')(server);
Clients
I developed the website with https://cdn.socket.io/socket.io-1.4.5.js
I developed the iOS application with pod 'Socket.IO-Client-Swift', '~> 5.5.0'
Finally I'm developing the Android application with
compile ('io.socket:socket.io-client:0.7.0') { exclude group: 'org.json', module: 'json' }
In the website and in iOS application I haven't problems with the websocket, but when I try to connect the socket in Android application I receive the following error:
io.socket.engineio.client.EngineIOException: xhr poll error
Thanks