primus/primus — pull request #260 by lpinca (2014-06-26 15:47:32+00:00)
Title: Support Faye-WebSocket as alternate WebSocket transformer

Two minor things:

1. I removed the `websocket.OPEN` check here https://github.com/primus/primus/blob/faye-ws/transformers/faye/server.js#L34-L38. The `send` function in `faye-websocket` does this [check](https://github.com/faye/faye-websocket-node/blob/master/lib/faye/websocket/api.js#L90) for us. It is slightly different from our `ws` check. In this case the check passes when the `readyState` is `CONNECTING`.

2. In this check https://github.com/primus/primus/blob/faye-ws/transformers/faye/client.js#L76 insted of using something horrible like this `socket.readyState !== (Factory.OPEN || Factory.super_.OPEN)` i used directly `socket.readyState !== 1` which may be less readable.