Skip to content

Commit 1bfd207

Browse files
authored
Merge pull request #54 from lgeiger/sync-upstream
Sync with upstream JustinTulloss/zeromq.node
2 parents 587c1d7 + d48513e commit 1bfd207

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

binding.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,9 @@ namespace zmq {
15191519
opts_binary.insert(48); // ZMQ_CURVE_PUBLICKEY
15201520
opts_binary.insert(49); // ZMQ_CURVE_SECRETKEY
15211521
opts_binary.insert(50); // ZMQ_CURVE_SERVERKEY
1522+
opts_int.insert(51); //ZMQ_PROBE_ROUTER
15221523
opts_binary.insert(55); // ZMQ_ZAP_DOMAIN
1524+
opts_int.insert(66); //ZMQ_HANDSHAKE_IVL
15231525
#endif
15241526

15251527
NODE_DEFINE_CONSTANT(target, ZMQ_CAN_DISCONNECT);

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
},
1111
"dependencies": {
1212
"bindings": "~1.2.1",
13-
"nan": "~2.4.0",
13+
"nan": "^2.4.0",
1414
"prebuild": "^4.2.2"
1515
},
1616
"devDependencies": {
17-
"mocha": "~1.13.0",
18-
"semver": "~4.1.1",
19-
"should": "2.1.x"
17+
"mocha": "^3.1.0",
18+
"semver": "^5.3.0",
19+
"should": "^11.1.0"
2020
},
2121
"engines": {
2222
"node": ">=0.8"

test/socket.monitor.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ describe('socket.monitor', function() {
1010

1111
it('should be able to monitor the socket', function(done) {
1212
var rep = zmq.socket('rep')
13-
, req = zmq.socket('req')
14-
, events = [];
13+
, req = zmq.socket('req');
1514

1615
rep.on('message', function(msg){
1716
msg.should.be.an.instanceof(Buffer);
@@ -25,14 +24,10 @@ describe('socket.monitor', function() {
2524
// Test the endpoint addr arg
2625
event_endpoint_addr.toString().should.equal('tcp://127.0.0.1:5423');
2726

28-
// If this is a disconnect event we can now close the rep socket
29-
if (e === 'disconnect') {
30-
rep.close();
31-
}
32-
3327
testedEvents.pop();
3428
if (testedEvents.length === 0) {
3529
rep.unmonitor();
30+
rep.close();
3631
done();
3732
}
3833
});
@@ -62,7 +57,7 @@ describe('socket.monitor', function() {
6257

6358
// We will try to connect to a non-existing server, zmq will issue events: "connect_retry", "close", "connect_retry"
6459
// The connect_retry will be issued immediately after the close event, so we will measure the time between the close
65-
// event and connect_retry event, those should >= 10 (this will tell us that we are reading 1 event at a time from
60+
// event and connect_retry event, those should >= 9 (this will tell us that we are reading 1 event at a time from
6661
// the monitor socket).
6762

6863
var closeTime;
@@ -74,7 +69,7 @@ describe('socket.monitor', function() {
7469
var diff = Date.now() - closeTime;
7570
req.unmonitor();
7671
req.close();
77-
diff.should.be.within(10, 20);
72+
diff.should.be.within(9, 20);
7873
done();
7974
});
8075

0 commit comments

Comments
 (0)