I've been using gimite / web-socket-js to implement a WebSocket past simply Chrome and development builds of Safari. I want to move away from the Ruby server and onto Node.js. Suddenly it doesn't work in anything but Chrome.
I suspect that this has to do with the Flash Socket Policy file that I need to implement. I would like to implement this as an external Node.js process so as not to muddy with the original application. I am using the node-websocket-server for implementing WebSocket protocol with Node.js, and again I would prefer to not mess with that either.
It seemed like the simplest thing to do would be to run flashsocket.js, but running that gives me the following error:
sys:334
ctor.prototype = Object.create(superCtor.prototype, {
^
TypeError: Object prototype may only be an Object or null
at Function.create (native)
at Object.inherits (sys:334:29)
at Object.<anonymous> (/Users/me/Projects/testing/websocket/node-websocket-server/flashsocket.js:10:16)
at Module._compile (node.js:472:23)
at Module._loadScriptSync (node.js:479:10)
at Module.loadSync (node.js:349:12)
at Object.runMain (node.js:532:24)
at node.js:762:10
Here we run into the lovely cryptic errors Node.js is loved for.
My question is is there a stand alone global flash socket policy server I can run off of either Node.js or another application? My understanding is that I only need to have it reside on port 843. Or is there another WebSocket library for Node.js that will handle the Flash Policy like the Ruby server does?