Permalink
Browse files

Merge branch 'master' into all_options

  • Loading branch information...
2 parents 71a6eb6 + 66fd2f6 commit 252fb207a9482c7d507c0f46a0efdd7ec40d107b @AlexeyKupershtokh AlexeyKupershtokh committed Mar 23, 2013
View
@@ -17,4 +17,4 @@ before_install:
language: node_js
node_js:
- "0.8"
- - "0.9"
+ - "0.10"
View
@@ -1,29 +1,40 @@
+2.3.0 / 2013-03-15
+==================
+
+ * 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
+2.2.0 / 2012-10-17
==================
* add support for pkg-config
* add libzmq 3.x support [aaudis]
* fix: prevent GC happening too soon for connect/bindSync
-2.1.0 / 2012-06-29
+2.1.0 / 2012-06-29
==================
* fix require() for 0.8.0
* change: use uv_poll in place of IOWatcher
* remove stupid engines field
-2.0.3 / 2012-03-14
+2.0.3 / 2012-03-14
==================
* Removed -Wall (libuv unused vars caused the build to fail...)
-2.0.2 / 2012-02-16
+2.0.2 / 2012-02-16
==================
* Added back `.createSocket()` for BC. Closes #86
-2.0.1 / 2012-01-26
+2.0.1 / 2012-01-26
==================
* Added `.zmqVersion` [patricklucas]
View
@@ -20,6 +20,6 @@ docclean:
rm -fr docs/index.{json,html}
distclean:
- node-waf distclean
+ node-gyp clean
.PHONY: clean distclean test docs docclean
View
@@ -35,10 +35,23 @@
#include <set>
#ifdef _WIN32
-#define snprintf _snprintf_s
+# define snprintf _snprintf_s
+ typedef BOOL (WINAPI* SetDllDirectoryFunc)(wchar_t *lpPathName);
+ class SetDllDirectoryCaller {
+ public:
+ explicit SetDllDirectoryCaller() : func_(NULL) { }
+ ~SetDllDirectoryCaller() {
+ if (func_)
+ func_(NULL);
+ }
+ // Sets the SetDllDirectory function pointer to activates this object.
+ void set_func(SetDllDirectoryFunc func) { func_ = func; }
+ private:
+ SetDllDirectoryFunc func_;
+ };
#endif
-#define ZMQ_CAN_DISCONNECT (ZMQ_VERSION_MAJOR == 3 and ZMQ_VERSION_MINOR >= 2) or ZMQ_VERSION_MAJOR > 3
+#define ZMQ_CAN_DISCONNECT (ZMQ_VERSION_MAJOR == 3 && ZMQ_VERSION_MINOR >= 2) || ZMQ_VERSION_MAJOR > 3
using namespace v8;
using namespace node;
@@ -938,11 +951,41 @@ namespace zmq {
}
} // namespace zmq
+
// module
extern "C" void
init(Handle<Object> target) {
+#ifdef _MSC_VER
+ // On Windows, inject the windows/lib folder into the DLL search path so that
+ // it will pick up our bundled DLL in case we do not have zmq installed on
+ // this system.
+ HMODULE kernel32_dll = GetModuleHandleW(L"kernel32.dll");
+ SetDllDirectoryCaller caller;
+ SetDllDirectoryFunc set_dll_directory;
+ wchar_t path[MAX_PATH] = L"";
+ wchar_t pathDir[MAX_PATH] = L"";
+ if (kernel32_dll != NULL) {
+ set_dll_directory =
+ (SetDllDirectoryFunc)GetProcAddress(kernel32_dll, "SetDllDirectoryW");
+ if (set_dll_directory) {
+ GetModuleFileNameW(GetModuleHandleW(L"zmq.node"), path, MAX_PATH - 1);
+ wcsncpy(pathDir, path, wcsrchr(path, '\\') - path);
+ path[0] = '\0';
+ pathDir[wcslen(pathDir)] = '\0';
+# ifdef _WIN64
+ wcscat(pathDir, L"\\..\\..\\windows\\lib\\x64");
+# else
+ wcscat(pathDir, L"\\..\\..\\windows\\lib\\x86");
+# endif
+ _wfullpath(path, pathDir, MAX_PATH);
+ set_dll_directory(path);
+ caller.set_func(set_dll_directory);
+ LoadLibrary("libzmq-v100-mt-3_2_2");
+ }
+ }
+#endif
zmq::Initialize(target);
}
-NODE_MODULE(binding, init)
+NODE_MODULE(zmq, init)
View
@@ -1,12 +1,37 @@
{
'targets': [
{
- 'target_name': 'binding',
+ 'target_name': 'zmq',
'sources': [ 'binding.cc' ],
- 'libraries': ['-lzmq'],
- 'cflags!': ['-fno-exceptions'],
- 'cflags_cc!': ['-fno-exceptions'],
'conditions': [
+ ['OS=="win"', {
+ 'include_dirs': ['windows/include'],
+ 'link_settings': {
+ 'libraries': [
+ 'Delayimp.lib',
+ ],
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'libraries': [
+ '<(PRODUCT_DIR)/../../windows/lib/x86/libzmq-v100-mt-3_2_2.lib',
+ ]
+ },{
+ 'libraries': [
+ '<(PRODUCT_DIR)/../../windows/lib/x64/libzmq-v100-mt-3_2_2.lib',
+ ]
+ }]
+ ],
+ },
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'DelayLoadDLLs': ['libzmq-v100-mt-3_2_2.dll']
+ }
+ },
+ }, {
+ 'libraries': ['-lzmq'],
+ 'cflags!': ['-fno-exceptions'],
+ 'cflags_cc!': ['-fno-exceptions'],
+ }],
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
View
@@ -3,7 +3,7 @@
*/
var EventEmitter = require('events').EventEmitter
- , zmq = require('../build/Release/binding');
+ , zmq = require('../build/Release/zmq');
/**
* Expose bindings as the module.
View
@@ -1,6 +1,6 @@
{
"name": "zmq",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Bindings for node.js to zeromq",
"main": "index",
"repository": {
@@ -37,11 +37,14 @@
"Iskren Ivov Chernev <iskren.chernev@gmail.com>",
"Seth Fitzsimmons",
"Patrick Lucas",
- "Alexander Simmerl",
+ "Alexander Simmerl (https://github.com/xla)",
"Ian Babrou",
"Niall O'Higgins",
- "Brian White",
+ "Brian White (https://github.com/mscdex)",
+ "Mathieu D'Amours (https://github.com/matehat)",
"Joshua Gourneau",
- "Yaroslav Shirokov"
+ "Yaroslav Shirokov",
+ "Marc Harter (https://github.com/wavded)",
+ "John Sun (https://github.com/freehaha)"
]
}
View
@@ -25,13 +25,13 @@ sub.on('message', function (data) {
function finish(){
var endtime = process.hrtime(timer)
var millis = (endtime[0]*1000) + (endtime[1]/1000000)
- var throughput = message_count / (millis/1000000)
+ var throughput = message_count / (millis / 1000)
var megabits = (throughput * message_size * 8) / 1000000
console.log('message size: %d [B]', message_size)
console.log('message count: %d', message_count)
console.log('mean throughput: %d [msg/s]', throughput.toFixed(0))
- console.log('mean throughput: %d [Mb/s]', megabits.toFixed(0))
+ console.log('mean throughput: %d [Mbit/s]', megabits.toFixed(0))
console.log('overall time: %d secs and %d nanoseconds', endtime[0], endtime[1])
sub.close()
}
View
@@ -57,8 +57,8 @@ if (semver.satisfies(zmq.version, '2.x')) {
]);
}
-// 3.x only.
-if (semver.satisfies(zmq.version, '3.x')) {
+// 3.0 and above.
+if (semver.gte(zmq.version, '3.0.0')) {
constants.concat([
'XPUB',
'XSUB',
@@ -70,7 +70,7 @@ if (semver.satisfies(zmq.version, '3.x')) {
}
// 3.2 and above.
-if (semver.gte('3.2')) {
+if (semver.gte(zmq.version, '3.2.0')) {
constants.concat([
'IPV4ONLY',
'DELAY_ATTACH_ON_CONNECT',
Oops, something went wrong.

0 comments on commit 252fb20

Please sign in to comment.