Socket io not connecting to server

I trying to connect with socket IO for socket chat in objective c

I got error:- Connecting to socket with URL: http://localhost:3000/socket.io/1/?t=1488361578848

ERROR: handshake failed … Server returned status code 400

I have used:- pod ‘SocketRocket’

socketIO = [[SocketIO alloc] initWithDelegate:self];
[socketIO connectToHost:@“localhost” onPort:3000];

Have you tried to use something like Charles as an intervening proxy to find out just what the server is responding? If I had to guess I would say the server might need configuration but a 400 is a very generic error and hard to debug with just that information.

1 Like

when i push the same url in postman i get result like this:-> {“code”:0,“message”:“Transport unknown”}

URL: > http://localhost:3000/socket.io/1/?t=1488268356469

I have heard of this being due to a big change between socket.io versions 0.9 and 1.0 - can you verify that the library version you are using matches the one on the server?