Is the 'resource' config option still supported?
Specifying a custom resource (of course both on the client and server side) doesn't seem to work any longer. I have a system where users define its URLs for their content so all "system URLs" (ajax calls etc.) start with an 'underscore folder' ie. /_/some/command
So I wanted to relegate Socket.IO to the '/_/sockio/' resource and this worked pre-0.7. Trying both the purported "new Express-style" config-setting and the old-school options object, here's the server-side initialization:
if (@io = socketio.listen(@httpServer, resource: '_/sockio/', transports: ['websocket'], 'flash policy server': false, 'browser client': false))
@io.configure '', =>
@io.set('resource', '_/sockio/')
@io.set('transports', ['websocket'])
@io.disable('flash policy server')
@io.disable('browser client')
Tried both /_/sockio and _/sockio/ -- always the requests don't get processed by Socket.IO but my own _ URL handler, unlike in the previous version (0.6.x). Am I doing it wrong?
Yes its still supported, but we didn't document it because we feel that you shouldn't mess with it. See https://github.com/LearnBoost/socket.io/blob/master/lib/manager.js#L67
So what's wrong with my code then? o_O
@pearjoint you probably did something wrong on the client side.
Working example: https://gist.github.com/1102456
Is this still supported? I can't get it to work in my application
It's the same issue for me. I would like to change the path but the option 'resource' doesn't change anything! I try to put nginx as reverse proxy of nodejs.