title: Socket.io-objc 400 (Handshake Error) Remote Server vs. localhost
body: <p>When I connect to Socket.io on the server I get a 400 error, but I don't see any errors connecting to localhost. (same code and connecting via socket.io-objc)</p>
  
  <p>I'm using Azure to host the node.js project.
  (I also have websockets on in the azure config if that makes a difference)</p>
  
  <pre><code>ERROR: handshake failed ... The request timed out.
  onError() Error Domain=SocketIOError Code=-6 "The operation couldn’t be completed.
  (SocketIOError error -6.)" UserInfo=0x1874cc00 {NSUnderlyingError=0x1870cad0 "The request timed out."}
  </code></pre>
  
  <p>Server Code (On Azure)</p>
  
  <pre><code>var fs = require('fs');
  var app = require('express')(),
  server = require('http').createServer(app),
  redis = require("redis"),
  Primus = require('primus'),
  kue = require("kue");
  
  var haversine = require('haversine')
  var finish = require("finish");
  var client = redis.createClient(12276, "redis url");
  
  client.auth('password');
  
  var io = require('socket.io').listen(server);
  
  
  
  
  io.sockets.on('connection', function (socket) {
  
  socket.emit('join', { status: 'connected' });
  
  });
  
  
  
  var port = process.env.port || 1337;
  server.listen(port);
  </code></pre>
  
  <p>SOCKET.IO-OBJC CODE</p>
  
  <pre><code>- (void) reconnect
  {
      [socketIO disconnectForced];
      socketIO = [[SocketIO alloc] initWithDelegate:self];
      socketIO.useSecure = NO;
      [socketIO connectToHost:@"siteurl" onPort:80];
  }
  </code></pre>