Comparing version 2.2.0 to 2.3.0
@@ -0,3 +1,14 @@ | ||
2.3.0 / 2013-03-15 | ||
================== | ||
2.2.0 / 2012-10-17 | ||
* added: xpub/xsub socket types [xla] | ||
* added: support for zmq_disconnect [matehat] | ||
* added: LAST_ENDPOINT socket option [ronkorving] | ||
* added: local/remote_lat local/remote_thr perf test [wavded] | ||
* fixed: tests improved [qubyte, jeremybarnes, ronkorving] | ||
* fixed: Node v0.9.4+ compatibility [mscdex] | ||
* fixed: SNDHWM and RCVHWM options were given the wrong type [freehaha] | ||
* removed: waf support [mscdex] | ||
2.2.0 / 2012-10-17 | ||
================== | ||
@@ -9,3 +20,3 @@ | ||
2.1.0 / 2012-06-29 | ||
2.1.0 / 2012-06-29 | ||
================== | ||
@@ -17,3 +28,3 @@ | ||
2.0.3 / 2012-03-14 | ||
2.0.3 / 2012-03-14 | ||
================== | ||
@@ -23,3 +34,3 @@ | ||
2.0.2 / 2012-02-16 | ||
2.0.2 / 2012-02-16 | ||
================== | ||
@@ -29,3 +40,3 @@ | ||
2.0.1 / 2012-01-26 | ||
2.0.1 / 2012-01-26 | ||
================== | ||
@@ -32,0 +43,0 @@ |
@@ -26,3 +26,5 @@ /** | ||
pub: zmq.ZMQ_PUB | ||
, xpub: zmq.ZMQ_XPUB | ||
, sub: zmq.ZMQ_SUB | ||
, xsub: zmq.ZMQ_XSUB | ||
, req: zmq.ZMQ_REQ | ||
@@ -57,2 +59,3 @@ , xreq: zmq.ZMQ_XREQ | ||
, rcvbuf: zmq.ZMQ_RCVBUF | ||
, last_endpoint: zmq.ZMQ_LAST_ENDPOINT | ||
, reconnect_ivl: zmq.ZMQ_RECONNECT_IVL | ||
@@ -88,3 +91,3 @@ , recovery_ivl: zmq.ZMQ_RECOVERY_IVL | ||
// prevent GC from touching connect and bindSync | ||
// prevent GC from touching connect, disconnect and bindSync | ||
function gcWrap (self) {} | ||
@@ -210,2 +213,18 @@ | ||
/** | ||
* Connect to `addr`. | ||
* | ||
* @param {String} addr | ||
* @return {Socket} for chaining | ||
* @api public | ||
*/ | ||
Socket.prototype.disconnect = function(addr) { | ||
if (zmq.ZMQ_CAN_DISCONNECT) { | ||
this._zmq.disconnect(addr); | ||
setTimeout(gcWrap, 0, this); | ||
} | ||
return this; | ||
}; | ||
/** | ||
* Subscribe with the given `filter`. | ||
@@ -281,3 +300,3 @@ * | ||
if (!flags) break; | ||
if (flags & zmq.ZMQ_POLLIN) { | ||
@@ -340,3 +359,3 @@ emitArgs = ['message']; | ||
exports.socket = | ||
exports.socket = | ||
exports.createSocket = function(type, options) { | ||
@@ -343,0 +362,0 @@ var sock = new Socket(type); |
{ | ||
"name": "zmq", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Bindings for node.js to zeromq", | ||
@@ -14,3 +14,4 @@ "main": "index", | ||
"jade": "*", | ||
"dox": "*" | ||
"dox": "*", | ||
"semver": "*" | ||
}, | ||
@@ -20,2 +21,6 @@ "engines": { | ||
}, | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"author": "Justin Tulloss <justin.tulloss@gmail.com> (http://justin.harmonize.fm)", | ||
"contributors": [ | ||
@@ -30,4 +35,19 @@ "Justin Tulloss <justin.tulloss@gmail.com> (http://justin.harmonize.fm)", | ||
"Micheil Smith <micheil@brandedcode.com> (http://brandedcode.com/)", | ||
"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com/)" | ||
"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com/)", | ||
"Ron Korving (https://github.com/ronkorving)", | ||
"Mark Everitt (http://qubyte.dyndns.org/)", | ||
"Aldis Andrejevs (https://github.com/aaudis)", | ||
"Iskren Ivov Chernev <iskren.chernev@gmail.com>", | ||
"Seth Fitzsimmons", | ||
"Patrick Lucas", | ||
"Alexander Simmerl (https://github.com/xla)", | ||
"Ian Babrou", | ||
"Niall O'Higgins", | ||
"Brian White (https://github.com/mscdex)", | ||
"Mathieu D'Amours (https://github.com/matehat)", | ||
"Joshua Gourneau", | ||
"Yaroslav Shirokov", | ||
"Marc Harter (https://github.com/wavded)", | ||
"John Sun (https://github.com/freehaha)" | ||
] | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
[](https://travis-ci.org/JustinTulloss/zeromq.node) | ||
# node-zeromq | ||
@@ -7,2 +9,4 @@ | ||
[Install zmq package](http://www.zeromq.org/intro:get-the-software) first. | ||
$ npm install zmq | ||
@@ -55,29 +59,1 @@ | ||
$ make test | ||
## Contributors | ||
Authored by Justin Tulloss, maintained by Shripad K and TJ Holowaychuk. To contribute please ensure _all_ tests pass, and do your best to maintain the style used within the rest of the library. | ||
Output of `git summary`: | ||
project: zeromq.node | ||
commits: 260 | ||
files : 38 | ||
authors: | ||
114 Justin Tulloss 43.8% | ||
53 Tj Holowaychuk 20.4% | ||
48 Stéphan Kochen 18.5% | ||
12 jeremybarnes 4.6% | ||
10 TJ Holowaychuk 3.8% | ||
9 mike castleman 3.5% | ||
3 Yaroslav Shirokov 1.2% | ||
2 Corey Jewett 0.8% | ||
2 mgc 0.8% | ||
1 rick 0.4% | ||
1 Matt Crocker 0.4% | ||
1 Joshua Gourneau 0.4% | ||
1 Micheil Smith 0.4% | ||
1 Jeremy Barnes 0.4% | ||
1 nponeccop 0.4% | ||
1 Paul Bergeron 0.4% | ||
var zmq = require('../') | ||
, should = require('should'); | ||
, should = require('should') | ||
, semver = require('semver'); | ||
// version | ||
zmq.version.should.match(/^\d+\.\d+\.\d+$/); | ||
semver.valid(zmq.version).should.be.ok; | ||
// socket types | ||
// socket types and socket opts | ||
['PUB', 'SUB', 'REQ', 'XREQ', 'XREP', | ||
'DEALER', 'ROUTER', 'PUSH', 'PULL', 'PAIR'].forEach(function(type){ | ||
zmq['ZMQ_' + type].should.be.a('number'); | ||
}); | ||
// All versions. | ||
var constants = [ | ||
'PUB', | ||
'SUB', | ||
'REQ', | ||
'XREQ', | ||
'REP', | ||
'XREP', | ||
'DEALER', | ||
'ROUTER', | ||
'PUSH', | ||
'PULL', | ||
'PAIR', | ||
'AFFINITY', | ||
'IDENTITY', | ||
'SUBSCRIBE', | ||
'UNSUBSCRIBE', | ||
'RATE', | ||
'RECOVERY_IVL', | ||
'SNDBUF', | ||
'RCVBUF', | ||
'RCVMORE', | ||
'FD', | ||
'EVENTS', | ||
'TYPE', | ||
'LINGER', | ||
'RECONNECT_IVL', | ||
'BACKLOG', | ||
'POLLIN', | ||
'POLLOUT', | ||
'POLLERR', | ||
'SNDMORE' | ||
]; | ||
// socket opts | ||
// 2.x only. | ||
if (semver.satisfies(zmq.version, '2.x')) { | ||
constants.concat([ | ||
'HWM', | ||
'SWAP', | ||
'MCAST_LOOP', | ||
'NOBLOCK' | ||
]); | ||
} | ||
['HWM', 'SWAP', 'AFFINITY', 'IDENTITY', | ||
'SUBSCRIBE', 'UNSUBSCRIBE', 'RATE', | ||
'RECOVERY_IVL', 'RECOVERY_IVL', 'MCAST_LOOP', | ||
'SNDBUF', 'RCVBUF', 'RCVMORE', 'SNDMORE', 'FD', 'EVENTS', | ||
'TYPE', 'LINGER', 'RECONNECT_IVL', 'BACKLOG'].forEach(function(prop){ | ||
zmq['ZMQ_' + prop].should.be.a('number'); | ||
// 3.0 and above. | ||
if (semver.gte(zmq.version, '3.0.0')) { | ||
constants.concat([ | ||
'XPUB', | ||
'XSUB', | ||
'SNDHWM', | ||
'RCVHWM' | ||
]); | ||
} | ||
// 3.2 and above. | ||
if (semver.gte(zmq.version, '3.2.0')) { | ||
constants.concat([ | ||
'LAST_ENDPOINT' | ||
]); | ||
} | ||
constants.forEach(function(typeOrProp){ | ||
zmq['ZMQ_' + typeOrProp].should.be.a('number'); | ||
}); | ||
@@ -25,0 +76,0 @@ |
@@ -29,6 +29,18 @@ | ||
pub.connect('inproc://stuff'); | ||
pub.send('js is cool'); | ||
pub.send('ruby is meh'); | ||
pub.send('py is pretty cool'); | ||
pub.send('luna is cool too'); | ||
// The connect is asynchronous, and messages published to a non- | ||
// connected socket are silently dropped. That means that there is | ||
// a race between connecting and sending the first message which | ||
// causes this test to hang, especially when running on Linux. Even an | ||
// inproc:// socket seems to be asynchronous. So instead of | ||
// sending straight away, we wait 100ms for the connection to be | ||
// established before we start the send. This fixes the observed | ||
// hang. | ||
setTimeout(function() { | ||
pub.send('js is cool'); | ||
pub.send('ruby is meh'); | ||
pub.send('py is pretty cool'); | ||
pub.send('luna is cool too'); | ||
}, 100.0); | ||
}); |
@@ -28,7 +28,21 @@ | ||
sub.bind('inproc://stuff', function(){ | ||
pub.connect('inproc://stuff'); | ||
pub.send('foo'); | ||
pub.send('bar'); | ||
pub.send('baz'); | ||
var addr = "inproc://stuff"; | ||
sub.bind(addr, function(){ | ||
pub.connect(addr); | ||
// The connect is asynchronous, and messages published to a non- | ||
// connected socket are silently dropped. That means that there is | ||
// a race between connecting and sending the first message which | ||
// causes this test to hang, especially when running on Linux. Even an | ||
// inproc:// socket seems to be asynchronous. So instead of | ||
// sending straight away, we wait 100ms for the connection to be | ||
// established before we start the send. This fixes the observed | ||
// hang. | ||
setTimeout(function() { | ||
pub.send('foo'); | ||
pub.send('bar'); | ||
pub.send('baz'); | ||
}, 100.0); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
88493
44
1207
5
58
1