Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Massive perf boost * 💥 fix travis tests: add pkg libssl-dev • also update gcc to 4.9 • update libzmq to 4.1.4 Signed-off-by: Bent Cardan <bent@nothingsatisfies.com> * Add unref/ref APIs to detach/attach sockets from/to the event loop. * This does not affect reference counting of internal Socket C++ objects which is a subclass of ObjectWrap because unref() only temporarily disables the socket polling without adding/removing endpoints. * To avoid conflicts with ObjectWrap's Unref/Ref methods, I used explicit method names in the C++ side (e.g., DetachFromEventLoop) while keeping the Javascript-side names same to vanilla Sockets (e.g., unref). * When there is no endpoints, it automatically detaches the socket from the event loop to reduce polling overheads. When there is one or more endpoints, it automatically re-attach the socket. * Update README for unref/ref APIs. * Also fix some Markdown incompatibilities with 3rd party editors. * Updated history * State cleanup when (un)bindsync fails Fixes #507 * History update * Update history * Skip curve export test if libsodium is missing (#509) * Fixes batch isClosed check (#513) * Bump NAN to 2.2.0 (#520) * Release notes update * Release 2.15.0 * Bump NAN to 2.3 This gets rid of deprecation warnings introduced in Node 6. * Release 2.15.1 * Travis test on Node.js 6 (#530) * Burst test for router/dealer (#529) * Burst test for router/dealer * Made burst-test multi-part * Should fix missing incoming messages (#531) * Should fix missing incoming messages * Final fix * Release * This fixes burst sends on "req" sockets. (#536) * This fixes burst sends on "req" sockets. * Fix missing read flush triggered during send * Release * skip monitoring callback if socket has been closed (#540)
- Loading branch information
Showing
20 changed files
with
254 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ node_modules | |
Makefile.gyp | ||
binding.Makefile | ||
binding.target.gyp.mk | ||
npm-debug.log | ||
gyp-mac-tool | ||
out/ | ||
zmq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
var zmq = require('..') | ||
, should = require('should') | ||
, semver = require('semver'); | ||
|
||
var version = semver.gte(zmq.version, '3.2.0'); | ||
|
||
describe('socket.error-callback', function(){ | ||
var sock; | ||
|
||
if (!version) { | ||
return console.warn("ZMQ_ROUTER_MANDATORY requires libzmq 3.2.0, skipping test"); | ||
} | ||
|
||
it('should create a socket and set ZMQ_ROUTER_MANDATORY', function () { | ||
sock = zmq.socket('router'); | ||
sock.setsockopt(zmq.ZMQ_ROUTER_MANDATORY, 1); | ||
}); | ||
|
||
it('should callback with error when not connected', function (done) { | ||
sock.send(['foo', 'bar'], null, function (error) { | ||
error.should.be.an.instanceof(Error); | ||
done(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.