socketstream/socketstream — pull request #327 by pygy (2012-12-11 20:36:52+00:00)
Title: Actions can now be a constructed object rather than a literal.

This is lighter from a memory standpoint, especially for large handlers.

Example:

```JavaScript
function RPC(req,res,ss){
this.req = req;
this.res = res;
this.ss = ss;
}

RPC.prototype.sendMessage = function(message) {
if (message && message.length > 0) { // Check for blank messages
this.ss.publish.all('newMessage', message); // Broadcast the message to everyone
return this.res(true); // Confirm it was sent to the originating client
} else {
return this.res(false);
}
}

exports.actions = function(req, res, ss) {
req.use('session');
return new RPC(req,res,ss);
};
```