getting an error when trying to use socket.io
<p>I am currently working with socket.io swift client. Running on Iphone SE. this is the swift code</p>

<pre><code> let socket = SocketIOClient(socketURL: URL(string: "http://example.com:4000")!, config: [.log(true), .forcePolling(true)]);
        socket.connect();
        socket.on("connect") {data, ack in
            print("socket is connected");
            socket.emit("getData", ["data": 3]);
        }
</code></pre>

<p>And on the server:</p>

<pre><code>var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);

io.on('connection', function(socket){
    console.log('a user connected');
    socket.on('disconnect', function(){
        console.log('user disconnected');
    });
    socket.on('getData', function(result){
        console.log(result);
    });
});


app.listen(4000, function () {
  console.log(' on at 4000!');
});
</code></pre>

<p>...And on the Xcode console, I get</p>

<pre><code>2016-09-29 16:38:33.871895 proj[3070:1019256] LOG SocketEngine: Handshaking
2016-09-29 16:38:33.872301 proj[3070:1019256] LOG SocketEnginePolling: Doing polling request
2016-09-29 16:38:34.004312 proj[3070:1019256] LOG SocketEnginePolling: Got polling response
2016-09-29 16:38:34.004874 proj[3070:1019283] LOG SocketEngine: Got message: Cannot GET /socket.io/?transport=polling&amp;amp;b64=1
2016-09-29 16:38:34.005283 proj[3070:1019283] ERROR SocketIOClient: Got unknown error from server Cannot GET /socket.io/?transport=polling&amp;amp;b64=1
</code></pre>

<p>Which demonstrates a connection is made and the server is successfully found, but something else is wrong.
Would appreciate any help.</p>