visionmedia/axon — pull request #23 by gjohnson (2012-08-07 06:45:58+00:00)
Title: mixins

Well they ended up needing to be a little different than the style I was referring to in learnboost/cluster. I found that to make them reusable without crazy hacks, they needed options passed to them.

```javascript
function PushSocket() {
Socket.call(this);
this.use(queue());
this.use(roundrobin({ fallback: this.enqueue }));
}
```

In this case I didn't not want couple `queue()` and `roundrobin()` by having roundrobin assume it should do `sock.buff.push(msg)` in the case of a failed write().