JavaScriptCore itself only implements the ECMAScript spec. Stuff like XMLHTTPRequest, web sockets, DOM, etc. comes from WebKit. If you absolutely want to run the Socket.IO JavaScript client, you can perhaps use a hidden UIWebView, although I'd recommend using Socket.IO-objc.
On an unrelated note, you can see what errors JSContext generates by either inspecting its exception property, or by setting a block that prints the error to the exceptionHandler property:
context.exceptionHandler = ^(JSContext *context, JSValue *exception) {
NSLog(@"[%@:%@:%@] %@\n%@", exception[@"sourceURL"], exception[@"line"], exception[@"column"], exception, [exception[@"stack"] toObject]);
};