JustinTulloss/zeromq.node — pull request #370 by reqshark (2014-11-06 20:45:32+00:00)
Title: cleaned up zmq_proxy() for travis

cleaning up my earlier PR by attempting to fix travis tests. note that libzmq API support for proxying xpub/xsub came out in v3.

The function in JS now supports API characteristics of native zmq_proxy() function. So this new method would go something like:

```js
var zmq = require('zmq');

var xsub = zmq.socket('xsub');
xsub.bindSync('tcp://*:5556');

var xpub = zmq.socket('xpub');
xpub.bindSync('tcp://*:5555');

var pub = zmq.socket('pub');
pub.bindSync('tcp://*:5554');

zmq.proxy(xpub, xsub, pub);
```

Written with support for a few useful socket combos `pull/push`, `xpub/xsub`, `router-dealer` and we could always just drop in support for other combos like I was thinking maybe proxying `pair/pair`.

also it throws an error when you don't get xpub/xsub supported socket order right. Strictly following the libzmq API would just fail silently in this case, I think, so that may slightly diverge from its native library counterpart.