socketstream/prism — pull request #4 by davisford (2013-05-06 15:56:45+00:00)
Title: Tweak to allow non-same-origin clients

Prism assumes same-origin clients. There currently is no way to pass through a host/port combo which is then passed down to the real-time transport from the client api.

This changes it so the top level client side options are passed all the way through to the transport in the client side code. You may wish to change the structure a bit, so it is more hierarchical:

```javascript
var app = require('./client')({
transport: {
host: ' your server-side host or ip here ',
port: 3001
},
otherOption: 'foo'
});
```

But as it stands, I'm using this in the following way in the client code:

```javascript
var app = require('./client')({
host: ' your server-side host or ip here ',
port: 3001
})
```

...and it will pass this through to the transport engine and use these params to connect to whichever host I tell it.

The last pull request was incorrect in both its description and implementation. I had wrongly considered that the server side code pass the host to the code generator, but this isn't flexible...say I want to dynamically switch my client at runtime. The process shouldn't really be tied to me running a piece of server code to re-generate a client per IP/port combo. I think the client should just be able to pass that in and configure the transport.

Hope that makes sense -- perhaps you have a better alternative?