From ca94cf568b6656d4936105cd57ce9c8509af28f5 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Wed, 4 Feb 2015 17:54:26 +0000 Subject: [PATCH 001/108] Add appveyor support for building on windows. --- appveyor.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..eb2fb68d --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,19 @@ +environment: + matrix: + - configuration: Release +branches: + only: + - master + +clone_folder: c:\libzmq + +build_script: + - md c:\build + - cd c:\build + - echo Running cmake... + - cmake -G "Visual Studio 12" -DCMAKE_BUILD_TYPE=%Configuration% c:\libzmq + - cmake --build . + +test_script: + - cd c:\build + - ctest -C %Configuration% From 18b6e6803bd0b8a11911d4adb3a0668f9630a347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kreuzberger?= Date: Tue, 14 Apr 2015 18:30:27 +0200 Subject: [PATCH 002/108] Add documenation for ZMQ_XPUP_NODROP fix for issue #1287 --- doc/zmq_setsockopt.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 52ee0a82..e73d2254 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -808,6 +808,23 @@ Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_XPUB +ZMQ_XPUB_NODROP: do not silently drop messages if SENDHWM is reached +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Sets the 'XPUB' socket behaviour to return error EAGAIN if SEND_HWM is +reached and the message could not be send. + +A value of '0' is the default and messages are dropped if SENDHWM is reached. + +A value of `0` is the default and drops the message silently when the peers +SNDHWM is reached. A value of `1` returns an 'EAGAIN' error code if the +SNDHWM is reached and ZMQ_DONTWAIT was used. + +[horizontal] +Option value type:: int +Option value unit:: 0, 1 +Default value:: 0 +Applicable socket types:: ZMQ_XPUB, ZMQ_PUB + ZMQ_WELCOME_MSG: set welcome message that will be received by subscriber when connecting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From d4a580349556afa98d98e4fa21532ccb7226e86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kreuzberger?= Date: Tue, 14 Apr 2015 18:32:06 +0200 Subject: [PATCH 003/108] Update zmq_setsockopt.txt #1287 --- doc/zmq_setsockopt.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index e73d2254..031c406f 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -810,11 +810,9 @@ Applicable socket types:: ZMQ_XPUB ZMQ_XPUB_NODROP: do not silently drop messages if SENDHWM is reached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Sets the 'XPUB' socket behaviour to return error EAGAIN if SEND_HWM is +Sets the 'XPUB' socket behaviour to return error EAGAIN if SENDHWM is reached and the message could not be send. -A value of '0' is the default and messages are dropped if SENDHWM is reached. - A value of `0` is the default and drops the message silently when the peers SNDHWM is reached. A value of `1` returns an 'EAGAIN' error code if the SNDHWM is reached and ZMQ_DONTWAIT was used. From c9bdcfc58486ef42946aea28d34c45c0d125a2fd Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 16 Apr 2015 00:40:32 +1000 Subject: [PATCH 004/108] allow host_os to accept mingw64 Changes the pattern for the host_os matches to *mingw* from *mingw32* to accept both mingw32 and mingw64 versions. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f0102e9d..ed616a82 100644 --- a/configure.ac +++ b/configure.ac @@ -245,7 +245,7 @@ case "${host_os}" in LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Ae]) AC_CHECK_FUNCS(gethrtime) ;; - *mingw32*) + *mingw*) AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS]) AC_DEFINE(ZMQ_HAVE_MINGW32, 1, [Have MinGW32]) AC_CHECK_HEADERS(windows.h) From 8957ad5edff47c28d852657cf0b69ba5ae20f11c Mon Sep 17 00:00:00 2001 From: Martin Natano Date: Fri, 17 Apr 2015 22:14:53 +0200 Subject: [PATCH 005/108] Add Bitrig to OS detection in configure.ac. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f0102e9d..d237e38a 100644 --- a/configure.ac +++ b/configure.ac @@ -225,7 +225,7 @@ case "${host_os}" in AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi ;; - *openbsd*) + *openbsd*|*bitrig*) # Define on OpenBSD to enable all library features CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS]) From 0673cd4e69296ec912103cb3dbe00e0d9fbc3b69 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Fri, 6 Feb 2015 09:36:47 +0100 Subject: [PATCH 006/108] Problem: test_disconnect_inproc sometimes fails Solution: add settle pause after zmq_connect Fixes #1340 --- tests/test_disconnect_inproc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_disconnect_inproc.cpp b/tests/test_disconnect_inproc.cpp index 25461a71..90e7d14e 100644 --- a/tests/test_disconnect_inproc.cpp +++ b/tests/test_disconnect_inproc.cpp @@ -94,11 +94,10 @@ int main(int, char**) { } if (iteration == 1) { zmq_connect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_connect: %s\n", zmq_strerror(errno)); - //zmq_connect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_connect: %s\n", zmq_strerror(errno)); + msleep (SETTLE_TIME); } if (iteration == 4) { zmq_disconnect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_disconnect(%d): %s\n", errno, zmq_strerror(errno)); - //zmq_disconnect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_disconnect: %s\n", zmq_strerror(errno)); } if (iteration > 4 && rc == 0) break; From 594e3dccebc164502bc1cf437c8bb51108e67f55 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Mon, 20 Apr 2015 12:51:10 +0200 Subject: [PATCH 007/108] Problem: shutdown asserts if WSASTARUP wasn't done previously This is a silly assertion that causes problems if libzmq.dll is called in some esoteric ways. Solution: if the shutdown code detects WSANOTINITIALISED, then exit silently. Fixes #1377 Fixes #1144 --- src/signaler.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/signaler.cpp b/src/signaler.cpp index a1fd72f0..914b9c1c 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -132,11 +132,14 @@ zmq::signaler_t::~signaler_t () const struct linger so_linger = { 1, 0 }; int rc = setsockopt (w, SOL_SOCKET, SO_LINGER, (const char *) &so_linger, sizeof so_linger); - wsa_assert (rc != SOCKET_ERROR); - rc = closesocket (w); - wsa_assert (rc != SOCKET_ERROR); - rc = closesocket (r); - wsa_assert (rc != SOCKET_ERROR); + // Only check shutdown if WSASTARTUP was previously done + if (rc == 0 || WSAGetLastError () != WSANOTINITIALISED) { + wsa_assert (rc != SOCKET_ERROR); + rc = closesocket (w); + wsa_assert (rc != SOCKET_ERROR); + rc = closesocket (r); + wsa_assert (rc != SOCKET_ERROR); + } #else int rc = close_wait_ms (w); errno_assert (rc == 0); From 30bd7c481e3151fa03ea0f32948eccebbe5b1372 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Tue, 21 Apr 2015 22:26:32 -0700 Subject: [PATCH 008/108] Fix integer narrowing issues. --- src/options.cpp | 2 +- src/plain_server.cpp | 2 +- src/socks.cpp | 19 +++++++++++-------- src/socks.hpp | 10 +++++----- src/socks_connecter.cpp | 6 +++--- src/stdint.hpp | 4 ++++ src/stream.cpp | 5 ++--- src/stream_engine.cpp | 2 +- src/tcp_connecter.cpp | 4 ++-- src/tcp_listener.cpp | 6 +++--- src/zmq_utils.cpp | 2 +- 11 files changed, 34 insertions(+), 28 deletions(-) diff --git a/src/options.cpp b/src/options.cpp index f08c595d..29eb45c8 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -96,7 +96,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, case ZMQ_IDENTITY: // Identity is any binary string from 1 to 255 octets if (optvallen_ > 0 && optvallen_ < 256) { - identity_size = optvallen_; + identity_size = (unsigned char) optvallen_; memcpy (identity, optval_, identity_size); return 0; } diff --git a/src/plain_server.cpp b/src/plain_server.cpp index f591f4e3..6a818927 100644 --- a/src/plain_server.cpp +++ b/src/plain_server.cpp @@ -265,7 +265,7 @@ int zmq::plain_server_t::produce_error (msg_t *msg_) const zmq_assert (rc == 0); char *msg_data = static_cast (msg_->data ()); memcpy (msg_data, "\5ERROR", 6); - msg_data [6] = status_code.length (); + msg_data [6] = (char) status_code.length (); memcpy (msg_data + 7, status_code.c_str (), status_code.length ()); return 0; } diff --git a/src/socks.cpp b/src/socks.cpp index f38d24a5..50e8612e 100644 --- a/src/socks.cpp +++ b/src/socks.cpp @@ -37,12 +37,10 @@ zmq::socks_greeting_t::socks_greeting_t (uint8_t method_) : } zmq::socks_greeting_t::socks_greeting_t ( - uint8_t *methods_, size_t num_methods_) + uint8_t *methods_, uint8_t num_methods_) : num_methods (num_methods_) { - zmq_assert (num_methods_ <= 255); - - for (size_t i = 0; i < num_methods_; i++) + for (uint8_t i = 0; i < num_methods_; i++) methods [i] = methods_ [i]; } @@ -55,8 +53,8 @@ void zmq::socks_greeting_encoder_t::encode (const socks_greeting_t &greeting_) uint8_t *ptr = buf; *ptr++ = 0x05; - *ptr++ = greeting_.num_methods; - for (size_t i = 0; i < greeting_.num_methods; i++) + *ptr++ = (uint8_t) greeting_.num_methods; + for (uint8_t i = 0; i < greeting_.num_methods; i++) *ptr++ = greeting_.methods [i]; bytes_encoded = 2 + greeting_.num_methods; @@ -118,10 +116,13 @@ void zmq::socks_choice_decoder_t::reset () bytes_read = 0; } + zmq::socks_request_t::socks_request_t ( uint8_t command_, std::string hostname_, uint16_t port_) : command (command_), hostname (hostname_), port (port_) -{} +{ + zmq_assert (hostname_.size () <= UINT8_MAX); +} zmq::socks_request_encoder_t::socks_request_encoder_t () : bytes_encoded (0), bytes_written (0) @@ -129,6 +130,8 @@ zmq::socks_request_encoder_t::socks_request_encoder_t () void zmq::socks_request_encoder_t::encode (const socks_request_t &req) { + zmq_assert (req.hostname.size() <= UINT8_MAX); + unsigned char *ptr = buf; *ptr++ = 0x05; *ptr++ = req.command; @@ -163,7 +166,7 @@ void zmq::socks_request_encoder_t::encode (const socks_request_t &req) } else { *ptr++ = 0x03; - *ptr++ = req.hostname.size (); + *ptr++ = (unsigned char) req.hostname.size (); memcpy (ptr, req.hostname.c_str (), req.hostname.size ()); ptr += req.hostname.size (); } diff --git a/src/socks.hpp b/src/socks.hpp index f0cf78e1..14b663a4 100644 --- a/src/socks.hpp +++ b/src/socks.hpp @@ -30,9 +30,9 @@ namespace zmq struct socks_greeting_t { socks_greeting_t (uint8_t method); - socks_greeting_t (uint8_t *methods_, size_t num_methods_); + socks_greeting_t (uint8_t *methods_, uint8_t num_methods_); - uint8_t methods [255]; + uint8_t methods [UINT8_MAX]; const size_t num_methods; }; @@ -48,7 +48,7 @@ namespace zmq private: size_t bytes_encoded; size_t bytes_written; - uint8_t buf [2 + 255]; + uint8_t buf [2 + UINT8_MAX]; }; struct socks_choice_t @@ -94,7 +94,7 @@ namespace zmq private: size_t bytes_encoded; size_t bytes_written; - uint8_t buf [4 + 256 + 2]; + uint8_t buf [4 + UINT8_MAX + 1 + 2]; }; struct socks_response_t @@ -116,7 +116,7 @@ namespace zmq void reset (); private: - uint8_t buf [4 + 256 + 2]; + int8_t buf [4 + UINT8_MAX + 1 + 2]; size_t bytes_read; }; diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index 7a2856e3..b6c789b3 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -148,7 +148,7 @@ void zmq::socks_connecter_t::in_event () // Attach the engine to the corresponding session object. send_attach (session, engine); - socket->event_connected (endpoint, s); + socket->event_connected (endpoint, (int) s); rm_fd (handle); s = -1; @@ -170,7 +170,7 @@ void zmq::socks_connecter_t::out_event () || status == sending_request); if (status == waiting_for_proxy_connection) { - const int rc = check_proxy_connection (); + const int rc = (int) check_proxy_connection (); if (rc == -1) error (); else { @@ -436,7 +436,7 @@ void zmq::socks_connecter_t::close () const int rc = ::close (s); errno_assert (rc == 0); #endif - socket->event_closed (endpoint, s); + socket->event_closed (endpoint, (int) s); s = retired_fd; } diff --git a/src/stdint.hpp b/src/stdint.hpp index 70063a00..f08488e9 100644 --- a/src/stdint.hpp +++ b/src/stdint.hpp @@ -59,4 +59,8 @@ typedef unsigned __int64 uint64_t; #endif +#ifndef UINT8_MAX +#define UINT8_MAX 0xFF +#endif + #endif diff --git a/src/stream.cpp b/src/stream.cpp index 8166fe22..2125e346 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -289,14 +289,13 @@ void zmq::stream_t::identify_peer (pipe_t *pipe_) connect_rid.length ()); connect_rid.clear (); outpipes_t::iterator it = outpipes.find (identity); - if (it != outpipes.end ()) - zmq_assert(false); + zmq_assert (it == outpipes.end ()); } else { put_uint32 (buffer + 1, next_rid++); identity = blob_t (buffer, sizeof buffer); memcpy (options.identity, identity.data (), identity.size ()); - options.identity_size = identity.size (); + options.identity_size = (unsigned char) identity.size (); } pipe_->set_identity (identity); // Add the record into output pipes lookup table diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 7f322b38..2c7a784a 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -928,7 +928,7 @@ void zmq::stream_engine_t::error (error_reason_t reason) terminator.close(); } zmq_assert (session); - socket->event_disconnected (endpoint, s); + socket->event_disconnected (endpoint, (int) s); session->flush (); session->engine_error (reason); unplug (); diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 435a9045..d36a9144 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -138,7 +138,7 @@ void zmq::tcp_connecter_t::out_event () // Shut the connecter down. terminate (); - socket->event_connected (endpoint, fd); + socket->event_connected (endpoint, (int) fd); } void zmq::tcp_connecter_t::timer_event (int id_) @@ -352,6 +352,6 @@ void zmq::tcp_connecter_t::close () const int rc = ::close (s); errno_assert (rc == 0); #endif - socket->event_closed (endpoint, s); + socket->event_closed (endpoint, (int) s); s = retired_fd; } diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index c1b4ebf0..343da58d 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -111,7 +111,7 @@ void zmq::tcp_listener_t::in_event () session->inc_seqnum (); launch_child (session); send_attach (session, engine, false); - socket->event_accepted (endpoint, fd); + socket->event_accepted (endpoint, (int) fd); } void zmq::tcp_listener_t::close () @@ -124,7 +124,7 @@ void zmq::tcp_listener_t::close () int rc = ::close (s); errno_assert (rc == 0); #endif - socket->event_closed (endpoint, s); + socket->event_closed (endpoint, (int) s); s = retired_fd; } @@ -239,7 +239,7 @@ int zmq::tcp_listener_t::set_address (const char *addr_) goto error; #endif - socket->event_listening (endpoint, s); + socket->event_listening (endpoint, (int) s); return 0; error: diff --git a/src/zmq_utils.cpp b/src/zmq_utils.cpp index 3b79deab..59efc8cf 100644 --- a/src/zmq_utils.cpp +++ b/src/zmq_utils.cpp @@ -155,7 +155,7 @@ uint8_t *zmq_z85_decode (uint8_t *dest, const char *string) } unsigned int byte_nbr = 0; unsigned int char_nbr = 0; - unsigned int string_len = strlen (string); + size_t string_len = strlen (string); uint32_t value = 0; while (char_nbr < string_len) { // Accumulate value in base 85 From c2dcc8060293fd5480219b0afaf5833a93afc8ba Mon Sep 17 00:00:00 2001 From: somdoron Date: Sat, 25 Apr 2015 23:21:27 +0300 Subject: [PATCH 009/108] change minimum version to windows vista and implement dummy condition variable for lower versions --- builds/cmake/platform.hpp.in | 10 --------- builds/mingw32/platform.hpp | 9 -------- builds/msvc/platform.hpp | 8 ------- src/condition_variable.hpp | 43 ++++++++++++++++++++++++++++++++++++ src/windows.hpp | 4 ++-- 5 files changed, 45 insertions(+), 29 deletions(-) diff --git a/builds/cmake/platform.hpp.in b/builds/cmake/platform.hpp.in index b1039dea..21930c42 100644 --- a/builds/cmake/platform.hpp.in +++ b/builds/cmake/platform.hpp.in @@ -86,14 +86,4 @@ #cmakedefine ZMQ_HAVE_WINDOWS -#ifdef ZMQ_HAVE_WINDOWS - #if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600 - #undef _WIN32_WINNT - #endif - - #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0600 - #endif -#endif - #endif \ No newline at end of file diff --git a/builds/mingw32/platform.hpp b/builds/mingw32/platform.hpp index 62d36c1f..4af872cd 100644 --- a/builds/mingw32/platform.hpp +++ b/builds/mingw32/platform.hpp @@ -29,13 +29,4 @@ #define ZMQ_HAVE_WINDOWS -#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600 - #undef _WIN32_WINNT -#endif - -#ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0600 -#endif - - #endif diff --git a/builds/msvc/platform.hpp b/builds/msvc/platform.hpp index d6e0ce60..4af872cd 100644 --- a/builds/msvc/platform.hpp +++ b/builds/msvc/platform.hpp @@ -29,12 +29,4 @@ #define ZMQ_HAVE_WINDOWS -#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600 - #undef _WIN32_WINNT -#endif - -#ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0600 -#endif - #endif diff --git a/src/condition_variable.hpp b/src/condition_variable.hpp index e6c6c52b..fbcad36a 100644 --- a/src/condition_variable.hpp +++ b/src/condition_variable.hpp @@ -31,6 +31,47 @@ #include "windows.hpp" +// Condition variable is supported from Windows Vista only, to use condition variable define _WIN32_WINNT to 0x0600 +#if _WIN32_WINNT < 0x0600 + +namespace zmq +{ + + class condition_variable_t + { + public: + inline condition_variable_t () + { + zmq_assert(false); + } + + inline ~condition_variable_t () + { + + } + + inline int wait (mutex_t* mutex_, int timeout_ ) + { + zmq_assert(false); + return -1; + } + + inline void broadcast () + { + zmq_assert(false); + } + + private: + + // Disable copy construction and assignment. + condition_variable_t (const condition_variable_t&); + void operator = (const condition_variable_t&); + }; + +} + +#else + namespace zmq { @@ -79,6 +120,8 @@ namespace zmq } +#endif + #else #include diff --git a/src/windows.hpp b/src/windows.hpp index eeb05fd1..39a52698 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -27,9 +27,9 @@ #define NOMINMAX // Macros min(a,b) and max(a,b) #endif -// Set target version to Windows Server 2003, Windows XP/SP1 or higher. +// Set target version to Windows Server 2008, Windows Vista or higher. Windows XP (0x0501) is also supported but without client & server socket types. #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 +#define _WIN32_WINNT 0x0600 #endif #ifdef __MINGW32__ From 09a65c55989111103a525da0c5f05897dfe99645 Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Tue, 28 Apr 2015 07:40:31 +0200 Subject: [PATCH 010/108] push: Don't delay pipe termination --- src/push.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/push.cpp b/src/push.cpp index 4da95821..d2531044 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -36,6 +36,9 @@ void zmq::push_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; + // Don't delay pipe termination as there is no one + // to receive the delimiter. + pipe_->set_nodelay (); zmq_assert (pipe_); lb.attach (pipe_); From 2e06737bf4b85fbb2d9d085566b48f02e0208798 Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Tue, 28 Apr 2015 07:44:22 +0200 Subject: [PATCH 011/108] pub: Don't delay pipe termination --- src/pub.cpp | 13 +++++++++++++ src/pub.hpp | 1 + 2 files changed, 14 insertions(+) diff --git a/src/pub.cpp b/src/pub.cpp index fd671882..7895fb86 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -18,6 +18,8 @@ */ #include "pub.hpp" +#include "pipe.hpp" +#include "err.hpp" #include "msg.hpp" zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : @@ -30,6 +32,17 @@ zmq::pub_t::~pub_t () { } +void zmq::pub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) +{ + zmq_assert (pipe_); + + // Don't delay pipe termination as there is no one + // to receive the delimiter. + pipe_->set_nodelay (); + + xpub_t::xattach_pipe (pipe_, subscribe_to_all_); +} + int zmq::pub_t::xrecv (class msg_t *) { // Messages cannot be received from PUB socket. diff --git a/src/pub.hpp b/src/pub.hpp index 21f1e304..f5359f0b 100644 --- a/src/pub.hpp +++ b/src/pub.hpp @@ -38,6 +38,7 @@ namespace zmq ~pub_t (); // Implementations of virtual functions from socket_base_t. + void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false); int xrecv (zmq::msg_t *msg_); bool xhas_in (); From 7e8ba0ecff4c26492a5560acef4473e22600fec5 Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Tue, 28 Apr 2015 10:42:56 +0200 Subject: [PATCH 012/108] Solution: Build libsodium from latest master branch. Fixes 1386. --- builds/qt-android/build.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/builds/qt-android/build.sh b/builds/qt-android/build.sh index 8f2c19f3..3d4e6057 100755 --- a/builds/qt-android/build.sh +++ b/builds/qt-android/build.sh @@ -26,15 +26,11 @@ if [[ $ANDROID_BUILD_CLEAN ]]; then fi ## -# Build libsodium from latest release tarball +# Build libsodium from latest master branch (android_build_verify_so "libsodium.so" &> /dev/null) || { rm -rf "${cache}/libsodium" - (cd "${cache}" && mkdir libsodium \ - && wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz\ - -O "${cache}/libsodium.tar.gz" \ - && tar -C libsodium -xf libsodium.tar.gz --strip=1) || exit 1 - + (cd "${cache}" && git clone git://github.com/jedisct1/libsodium.git) || exit 1 (cd "${cache}/libsodium" && ./autogen.sh \ && ./configure "${ANDROID_BUILD_OPTS[@]}" --disable-soname-versions \ && make \ From 7b9e9b838d2868c7fd4db47c09e23d831dc27925 Mon Sep 17 00:00:00 2001 From: Rik van der Heijden Date: Fri, 24 Apr 2015 23:01:20 +0200 Subject: [PATCH 013/108] Issue #1382: Do not send data to backend when there are no listeners (+ tests) --- .gitignore | 1 + AUTHORS | 1 + Makefile.am | 1 + src/proxy.cpp | 6 +- tests/CMakeLists.txt | 1 + tests/test_proxy_terminate.cpp | 113 +++++++++++++++++++++++++++++++++ 6 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 tests/test_proxy_terminate.cpp diff --git a/.gitignore b/.gitignore index fee8796f..a5d4fc07 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,7 @@ test_linger test_security_null test_security_plain test_proxy +test_proxy_terminate test_abstract_ipc test_filter_ipc test_connect_delay_tipc diff --git a/AUTHORS b/AUTHORS index 8402d31b..0b7d7fc5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -86,6 +86,7 @@ Philip Kovacs Pieter Hintjens Piotr Trojanek Richard Newton +Rik van der Heijden Robert G. Jakabosky Sebastian Otaegui Stefan Radomski diff --git a/Makefile.am b/Makefile.am index e63749ad..aa1c8f1a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -340,6 +340,7 @@ test_apps = \ tests/test_inproc_connect \ tests/test_issue_566 \ tests/test_proxy \ + tests/test_proxy_terminate \ tests/test_many_sockets \ tests/test_ipc_wildcard \ tests/test_diffserv \ diff --git a/src/proxy.cpp b/src/proxy.cpp index 81d98838..de0f045a 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -159,14 +159,16 @@ int zmq::proxy ( } // Process a request if (state == active - && items [0].revents & ZMQ_POLLIN) { + && items [0].revents & ZMQ_POLLIN + && items [1].revents & ZMQ_POLLOUT) { rc = forward(frontend_, backend_, capture_,msg); if (unlikely (rc < 0)) return -1; } // Process a reply if (state == active - && items [1].revents & ZMQ_POLLIN) { + && items [1].revents & ZMQ_POLLIN + && items [0].revents & ZMQ_POLLOUT) { rc = forward(backend_, frontend_, capture_,msg); if (unlikely (rc < 0)) return -1; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 74071a04..3daa8164 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -55,6 +55,7 @@ if(NOT WIN32) test_reqrep_ipc test_abstract_ipc test_proxy + test_proxy_terminate test_filter_ipc ) if(HAVE_FORK) diff --git a/tests/test_proxy_terminate.cpp b/tests/test_proxy_terminate.cpp new file mode 100644 index 00000000..83e70d4b --- /dev/null +++ b/tests/test_proxy_terminate.cpp @@ -0,0 +1,113 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" +#include "../include/zmq_utils.h" + +// This is a test for issue #1382. The server thread creates a SUB-PUSH +// steerable proxy. The main process then sends messages to the SUB +// but there is no pull on the other side, previously the proxy blocks +// in writing to the backend, preventing the proxy from terminating + +void +server_task (void *ctx) +{ + // Frontend socket talks to main process + void *frontend = zmq_socket (ctx, ZMQ_SUB); + assert (frontend); + int rc = zmq_setsockopt (frontend, ZMQ_SUBSCRIBE, "", 0); + assert (rc == 0); + rc = zmq_bind (frontend, "tcp://127.0.0.1:15564"); + assert (rc == 0); + + // Nice socket which is never read + void *backend = zmq_socket (ctx, ZMQ_PUSH); + assert (backend); + rc = zmq_bind (backend, "tcp://127.0.0.1:15563"); + assert (rc == 0); + + // Control socket receives terminate command from main over inproc + void *control = zmq_socket (ctx, ZMQ_SUB); + assert (control); + rc = zmq_setsockopt (control, ZMQ_SUBSCRIBE, "", 0); + assert (rc == 0); + rc = zmq_connect (control, "inproc://control"); + assert (rc == 0); + + // Connect backend to frontend via a proxy + zmq_proxy_steerable (frontend, backend, NULL, control); + + rc = zmq_close (frontend); + assert (rc == 0); + rc = zmq_close (backend); + assert (rc == 0); + rc = zmq_close (control); + assert (rc == 0); +} + + +// The main thread simply starts a basic steerable proxy server, publishes some messages, and then +// waits for the server to terminate. + +int main (void) +{ + setup_test_environment (); + + void *ctx = zmq_ctx_new (); + assert (ctx); + // Control socket receives terminate command from main over inproc + void *control = zmq_socket (ctx, ZMQ_PUB); + assert (control); + int rc = zmq_bind (control, "inproc://control"); + assert (rc == 0); + + void *thread = zmq_threadstart(&server_task, ctx); + msleep (500); // Run for 500 ms + + // Start a secondary publisher which writes data to the SUB-PUSH server socket + void *publisher = zmq_socket (ctx, ZMQ_PUB); + assert (publisher); + rc = zmq_connect (publisher, "tcp://127.0.0.1:15564"); + assert (rc == 0); + + msleep (50); + rc = zmq_send (publisher, "This is a test", 14, 0); + assert (rc == 14); + + msleep (50); + rc = zmq_send (publisher, "This is a test", 14, 0); + assert (rc == 14); + + msleep (50); + rc = zmq_send (publisher, "This is a test", 14, 0); + assert (rc == 14); + rc = zmq_send (control, "TERMINATE", 9, 0); + assert (rc == 9); + + rc = zmq_close (publisher); + assert (rc == 0); + rc = zmq_close (control); + assert (rc == 0); + + zmq_threadclose (thread); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); + return 0; +} From 74888769d664cb447bcff00298b6f74861afd9e1 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Fri, 1 May 2015 11:31:45 +0200 Subject: [PATCH 014/108] Problem: incomplete specs for test_proxy_terminate Solution: fixed this in Makefile.am --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.am b/Makefile.am index aa1c8f1a..3efd488c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -494,6 +494,9 @@ tests_test_issue_566_LDADD = src/libzmq.la tests_test_proxy_SOURCES = tests/test_proxy.cpp tests_test_proxy_LDADD = src/libzmq.la +tests_test_proxy_terminate_SOURCES = tests/test_proxy_terminate.cpp +tests_test_proxy_terminate_LDADD = src/libzmq.la + tests_test_many_sockets_SOURCES = tests/test_many_sockets.cpp tests_test_many_sockets_LDADD = src/libzmq.la From 095741cd9c7c623a62766edc8897c85462160d73 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 May 2015 01:11:54 +1000 Subject: [PATCH 015/108] set FD_SETSIZE to 1024 on mingw Sets FD_SETSIZE to 1024 under mingw systems, increasing it from the default of 64, and brings it into line with the previous limit for CMake builds on mingw. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 277811e7..67dd3409 100644 --- a/configure.ac +++ b/configure.ac @@ -265,6 +265,9 @@ case "${host_os}" in if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) fi + + # Additional for windows to set FD_SETSIZE to a larger number + CPPFLAGS=" -DFD_SETSIZE=1024 $CPPFLAGS" ;; *cygwin*) # Define on Cygwin to enable all library features From bd795d6f7a7c6c4ad95fc19b975c20ed962abc26 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 May 2015 01:12:22 +1000 Subject: [PATCH 016/108] Update configure.ac --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 67dd3409..d056ea3d 100644 --- a/configure.ac +++ b/configure.ac @@ -266,8 +266,8 @@ case "${host_os}" in AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) fi - # Additional for windows to set FD_SETSIZE to a larger number - CPPFLAGS=" -DFD_SETSIZE=1024 $CPPFLAGS" + # Additional for windows to set FD_SETSIZE to a larger number + CPPFLAGS=" -DFD_SETSIZE=1024 $CPPFLAGS" ;; *cygwin*) # Define on Cygwin to enable all library features From 166a14c4a507b7173a12300bd49ab7385dc39009 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 May 2015 01:13:33 +1000 Subject: [PATCH 017/108] Update configure.ac --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d056ea3d..9f491b73 100644 --- a/configure.ac +++ b/configure.ac @@ -266,7 +266,7 @@ case "${host_os}" in AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) fi - # Additional for windows to set FD_SETSIZE to a larger number + # Set FD_SETSIZE to 1024 CPPFLAGS=" -DFD_SETSIZE=1024 $CPPFLAGS" ;; *cygwin*) From f0a76318f420e591a6ea4600c7310d22253cb450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20S=2E=20Ga=C3=9Fmann?= Date: Tue, 5 May 2015 21:39:50 +0200 Subject: [PATCH 018/108] REPLACE MSVC VERSION SUFFIX VARIABLE Replace _zmq_COMPILER with CMAKE_VS_PLATFORM_TOOLSET; so the suffix can be automagically generated for every MSVC compiler supported by cmake. --- CMakeLists.txt | 14 +++++++------- builds/cmake/Modules/TestZMQVersion.cmake | 10 ---------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f23f0e4..5247f383 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -294,8 +294,8 @@ if(MSVC) set(OPENPGM_INCLUDE_DIRS ${OPENPGM_ROOT}/include) set(OPENPGM_LIBRARY_DIRS ${OPENPGM_ROOT}/lib) set(OPENPGM_LIBRARIES - optimized libpgm${_zmq_COMPILER}-mt-${OPENPGM_VERSION_MAJOR}_${OPENPGM_VERSION_MINOR}_${OPENPGM_VERSION_MICRO}.lib - debug libpgm${_zmq_COMPILER}-mt-gd-${OPENPGM_VERSION_MAJOR}_${OPENPGM_VERSION_MINOR}_${OPENPGM_VERSION_MICRO}.lib) + optimized libpgm-${CMAKE_VS_PLATFORM_TOOLSET}-mt-${OPENPGM_VERSION_MAJOR}_${OPENPGM_VERSION_MINOR}_${OPENPGM_VERSION_MICRO}.lib + debug libpgm-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${OPENPGM_VERSION_MAJOR}_${OPENPGM_VERSION_MINOR}_${OPENPGM_VERSION_MICRO}.lib) endif() else() if(WITH_OPENPGM) @@ -578,15 +578,15 @@ if(MSVC) target_link_libraries(libzmq ${OPTIONAL_LIBRARIES}) set_target_properties(libzmq PROPERTIES PUBLIC_HEADER "${public_headers}" - RELEASE_POSTFIX "${_zmq_COMPILER}-mt-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" - DEBUG_POSTFIX "${_zmq_COMPILER}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + RELEASE_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + DEBUG_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" COMPILE_DEFINITIONS "DLL_EXPORT") add_library(libzmq-static STATIC ${sources}) set_target_properties(libzmq-static PROPERTIES PUBLIC_HEADER "${public_headers}" - RELEASE_POSTFIX "${_zmq_COMPILER}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" - DEBUG_POSTFIX "${_zmq_COMPILER}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + RELEASE_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + DEBUG_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" COMPILE_FLAGS "/D ZMQ_STATIC" OUTPUT_NAME "libzmq") else() @@ -698,7 +698,7 @@ if(MSVC) ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include COMPONENT SDK) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/libzmq${_zmq_COMPILER}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}.pdb DESTINATION lib + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}.pdb DESTINATION lib COMPONENT SDK) else() install(TARGETS libzmq diff --git a/builds/cmake/Modules/TestZMQVersion.cmake b/builds/cmake/Modules/TestZMQVersion.cmake index 130c6013..49a3f309 100644 --- a/builds/cmake/Modules/TestZMQVersion.cmake +++ b/builds/cmake/Modules/TestZMQVersion.cmake @@ -6,13 +6,3 @@ string(REGEX REPLACE ".*#define ZMQ_VERSION_PATCH ([0-9]+).*" "\\1" ZMQ_VERSION_ set(ZMQ_VERSION "${ZMQ_VERSION_MAJOR}.${ZMQ_VERSION_MINOR}.${ZMQ_VERSION_PATCH}") message(STATUS "Detected ZMQ Version - ${ZMQ_VERSION}") - -if(MSVC_VERSION MATCHES "1700") - set(_zmq_COMPILER "-v110") -elseif(MSVC10) - set(_zmq_COMPILER "-v100") -elseif(MSVC90) - set(_zmq_COMPILER "-v90") -else() - set(_zmq_COMPILER "") -endif() From 5f9b2582957c1f46453e39b00afa21ae6822c936 Mon Sep 17 00:00:00 2001 From: Anton Sergeev Date: Wed, 6 May 2015 21:25:26 +0600 Subject: [PATCH 019/108] Make CMake option for perf-tools This allow disable making perf-tools in Release build type Signed-off-by: Anton Sergeev --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5247f383..1a3877fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -648,6 +648,12 @@ set(perf-tools local_lat inproc_thr) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") # Why? +option(WITH_PERF_TOOL "Build with perf-tools" ON) +else() +option(WITH_PERF_TOOL "Build with perf-tools" OFF) +endif() + +if(WITH_PERF_TOOL) foreach(perf-tool ${perf-tools}) add_executable(${perf-tool} perf/${perf-tool}.cpp) target_link_libraries(${perf-tool} libzmq) From f4f918ba73dcd1b0de17393f98fabb699ac8ade8 Mon Sep 17 00:00:00 2001 From: Dan Riegsecker <1baldgeek@gmail.com> Date: Thu, 7 May 2015 16:52:37 -0400 Subject: [PATCH 020/108] Some test fail to build targeting less that Windows Vista When targeting a version of Windows less than Windows Vista, the security tests fail to build. Added a check for Windows version and substituted inet_pton for inet_addr. Fixes libzmq issue #1396. --- tests/test_security_curve.cpp | 6 +++++- tests/test_security_null.cpp | 4 ++++ tests/test_security_plain.cpp | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 854f4f94..b8c7b2b0 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -235,7 +235,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); - inet_pton (AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#if (_WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof (ip4addr)); diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index 25ab74f4..d3b212a1 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -148,7 +148,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons(9003); +#if (_WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof ip4addr); diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index 909dc290..8bae0932 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -154,7 +154,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); - inet_pton (AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#if (_WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof (ip4addr)); From e89577d30c278fba0f9e40266ceb6fb2821907d5 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 13 May 2015 08:01:34 +0200 Subject: [PATCH 021/108] libzmq: Fix pkg-config files for static linking Libzmq uses C++ standard library features, so users of it should link against that as well when statically linking. Add it to Libs.private so users using pkg-config automatically gets the correct linker flags. Signed-off-by: Peter Korsgaard --- src/libzmq.pc.cmake.in | 1 + src/libzmq.pc.in | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libzmq.pc.cmake.in b/src/libzmq.pc.cmake.in index 4f57939d..e11685d1 100644 --- a/src/libzmq.pc.cmake.in +++ b/src/libzmq.pc.cmake.in @@ -7,4 +7,5 @@ Name: libzmq Description: 0MQ c++ library Version: @ZMQ_VERSION_MAJOR@.@ZMQ_VERSION_MINOR@.@ZMQ_VERSION_PATCH@ Libs: -L${libdir} -lzmq +Libs.private: -lstdc++ Cflags: -I${includedir} diff --git a/src/libzmq.pc.in b/src/libzmq.pc.in index ba155a38..52a39f72 100644 --- a/src/libzmq.pc.in +++ b/src/libzmq.pc.in @@ -7,4 +7,5 @@ Name: libzmq Description: 0MQ c++ library Version: @VERSION@ Libs: -L${libdir} -lzmq +Libs.private: -lstdc++ Cflags: -I${includedir} From 537626258f699f1ffc543a5b1f37c55236ef494c Mon Sep 17 00:00:00 2001 From: Brian Knox Date: Tue, 19 May 2015 09:38:53 -0400 Subject: [PATCH 022/108] remove temp printf from stream_engine --- src/stream_engine.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 2c7a784a..2cd02f69 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -668,18 +668,6 @@ bool zmq::stream_engine_t::handshake () } #endif else { - // Temporary support for security debugging - char mechanism [21]; - memcpy (mechanism, greeting_recv + 12, 20); - mechanism [20] = 0; - printf ("LIBZMQ I: security failure, self=%s peer=%s\n", - options.mechanism == ZMQ_NULL? "NULL": - options.mechanism == ZMQ_PLAIN? "PLAIN": - options.mechanism == ZMQ_CURVE? "CURVE": - options.mechanism == ZMQ_GSSAPI? "GSSAPI": - "OTHER", - mechanism); - error (protocol_error); return false; } From fcf7b22b9251cae7ab42cd7cb3cba55dc9c1c14b Mon Sep 17 00:00:00 2001 From: Diego Fons Date: Fri, 22 May 2015 15:46:28 -0300 Subject: [PATCH 023/108] doc/zmq_socket.txt: Remove note about ZMQ_PAIR being experimental. --- doc/zmq_socket.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt index 2c10c690..dbbadaf8 100644 --- a/doc/zmq_socket.txt +++ b/doc/zmq_socket.txt @@ -314,8 +314,7 @@ becomes available for sending; messages are not discarded. NOTE: 'ZMQ_PAIR' sockets are designed for inter-thread communication across the linkzmq:zmq_inproc[7] transport and do not implement functionality such -as auto-reconnection. 'ZMQ_PAIR' sockets are considered experimental and may -have other missing or broken aspects. +as auto-reconnection. [horizontal] .Summary of ZMQ_PAIR characteristics From 8a3296c1aa7e8873ca8c60c8c4a7c1d69eb3f647 Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Sat, 23 May 2015 23:18:10 +0200 Subject: [PATCH 024/108] Solution: add missing brackets --- src/socket_base.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 48c8597f..84234486 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -737,9 +737,10 @@ int zmq::socket_base_t::connect (const char *addr_) int rc = pgm_socket_t::init_address(address.c_str(), &res, &port_number); if (res != NULL) pgm_freeaddrinfo (res); - if (rc != 0 || port_number == 0) - EXIT_MUTEX(); - return -1; + if (rc != 0 || port_number == 0) { + EXIT_MUTEX(); + return -1; + } } #endif #if defined ZMQ_HAVE_TIPC From ae630cf3eb986815843e7cd1ec0238d2729bba2a Mon Sep 17 00:00:00 2001 From: Rik van der Heijden Date: Sun, 24 May 2015 22:39:36 +0200 Subject: [PATCH 025/108] Fix degradation from #1382, POLLOUT was tested but not requested --- src/proxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy.cpp b/src/proxy.cpp index de0f045a..0db8fdc3 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -108,8 +108,8 @@ int zmq::proxy ( int more; size_t moresz; zmq_pollitem_t items [] = { - { frontend_, 0, ZMQ_POLLIN, 0 }, - { backend_, 0, ZMQ_POLLIN, 0 }, + { frontend_, 0, ZMQ_POLLIN | ZMQ_POLLOUT, 0 }, + { backend_, 0, ZMQ_POLLIN | ZMQ_POLLOUT, 0 }, { control_, 0, ZMQ_POLLIN, 0 } }; int qt_poll_items = (control_ ? 3 : 2); From aa2e74c2a268ba69680ccdf743f7538935a721a6 Mon Sep 17 00:00:00 2001 From: Rik van der Heijden Date: Wed, 27 May 2015 14:27:53 +0200 Subject: [PATCH 026/108] Fix another degradation, CPU maxes out when POLLOUT is set because poll exits on POLLOUT and doesn't wait for POLLIN. --- src/proxy.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/proxy.cpp b/src/proxy.cpp index 0db8fdc3..99dc3448 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -108,11 +108,15 @@ int zmq::proxy ( int more; size_t moresz; zmq_pollitem_t items [] = { - { frontend_, 0, ZMQ_POLLIN | ZMQ_POLLOUT, 0 }, - { backend_, 0, ZMQ_POLLIN | ZMQ_POLLOUT, 0 }, + { frontend_, 0, ZMQ_POLLIN, 0 }, + { backend_, 0, ZMQ_POLLIN, 0 }, { control_, 0, ZMQ_POLLIN, 0 } }; int qt_poll_items = (control_ ? 3 : 2); + zmq_pollitem_t itemsout [] = { + { frontend_, 0, ZMQ_POLLOUT, 0 }, + { backend_, 0, ZMQ_POLLOUT, 0 } + }; // Proxy can be in these three states enum { @@ -127,6 +131,12 @@ int zmq::proxy ( if (unlikely (rc < 0)) return -1; + // Get the pollout separately because when combining this with pollin it maxes the CPU + // because pollout shall most of the time return directly + rc = zmq_poll (&itemsout [0], 2, 0); + if (unlikely (rc < 0)) + return -1; + // Process a control command if any if (control_ && items [2].revents & ZMQ_POLLIN) { rc = control_->recv (&msg, 0); @@ -160,7 +170,7 @@ int zmq::proxy ( // Process a request if (state == active && items [0].revents & ZMQ_POLLIN - && items [1].revents & ZMQ_POLLOUT) { + && itemsout [1].revents & ZMQ_POLLOUT) { rc = forward(frontend_, backend_, capture_,msg); if (unlikely (rc < 0)) return -1; @@ -168,7 +178,7 @@ int zmq::proxy ( // Process a reply if (state == active && items [1].revents & ZMQ_POLLIN - && items [0].revents & ZMQ_POLLOUT) { + && itemsout [0].revents & ZMQ_POLLOUT) { rc = forward(backend_, frontend_, capture_,msg); if (unlikely (rc < 0)) return -1; From d337cf5a96cf6c67a7bbbb4b23858a770ea41fc1 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Sun, 31 May 2015 00:57:53 +0200 Subject: [PATCH 027/108] Fixed out-of-bounds access when releasing socket handles. --- tests/test_system.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_system.cpp b/tests/test_system.cpp index c55de0ad..03bf11bf 100644 --- a/tests/test_system.cpp +++ b/tests/test_system.cpp @@ -84,6 +84,7 @@ int main (void) } } // Release the socket handles - while (count) - close (handle [count--]); + for (count = 0; count < 1000; count++) { + close(handle[count]); + } } From 1eb8e2a69f265571526a5c0880a52947d64daac7 Mon Sep 17 00:00:00 2001 From: ALEKSANDR MELNIKOV Date: Tue, 2 Jun 2015 20:17:15 +0600 Subject: [PATCH 028/108] HPUX build and gmake check issues solution (#1412) --- src/socket_base.cpp | 14 ++++++++++++++ src/thread.cpp | 2 +- tests/test_srcfd.cpp | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 84234486..fe44c368 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1489,9 +1489,23 @@ void zmq::socket_base_t::monitor_event (int event_, int value_, const std::strin // Send event in first frame zmq_msg_t msg; zmq_msg_init_size (&msg, 6); +#ifdef ZMQ_HAVE_HPUX + // avoid SIGBUS + union { + uint8_t data[6]; + struct { + uint16_t event; + uint32_t value; + } v; + } u; + u.v.event = event_; + u.v.value = value_; + memcpy(zmq_msg_data (&msg), u.data, 6); +#else uint8_t *data = (uint8_t *) zmq_msg_data (&msg); *(uint16_t *) (data + 0) = (uint16_t) event_; *(uint32_t *) (data + 2) = (uint32_t) value_; +#endif zmq_sendmsg (monitor_socket, &msg, ZMQ_SNDMORE); // Send address in second frame diff --git a/src/thread.cpp b/src/thread.cpp index 03758d27..b560ec98 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -104,7 +104,7 @@ void zmq::thread_t::stop () void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_) { -#if !defined ZMQ_HAVE_ZOS +#if !defined ZMQ_HAVE_ZOS && !defined ZMQ_HAVE_HPUX int policy = 0; struct sched_param param; diff --git a/tests/test_srcfd.cpp b/tests/test_srcfd.cpp index f5c6b5ea..03715d6c 100644 --- a/tests/test_srcfd.cpp +++ b/tests/test_srcfd.cpp @@ -67,7 +67,11 @@ int main (void) // get the remote endpoint struct sockaddr_storage ss; +#ifdef ZMQ_HAVE_HPUX + int addrlen = sizeof ss; +#else socklen_t addrlen = sizeof ss; +#endif rc = getpeername (srcFd, (struct sockaddr*) &ss, &addrlen); assert (rc == 0); From 8620c3e0323dec66ba72aa8071d1ff6ff129673a Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Tue, 2 Jun 2015 22:33:55 +0200 Subject: [PATCH 029/108] Problem: source file headers are somewhat confusing about LGPLv3 Of course people still "can" distributed the sources under the LGPLv3. However we provide COPYING.LESSER with additional grants. Solution: specify these grants in the header of each source file. --- builds/mingw32/platform.hpp | 29 ++++++++++++++-------- builds/msvc/platform.hpp | 29 ++++++++++++++-------- builds/zos/test_fork.cpp | 36 ++++++++++++++++++---------- include/zmq.h | 26 +++++++++++++------- include/zmq_utils.h | 26 +++++++++++++------- perf/inproc_lat.cpp | 26 +++++++++++++------- perf/inproc_thr.cpp | 26 +++++++++++++------- perf/local_lat.cpp | 26 +++++++++++++------- perf/local_thr.cpp | 26 +++++++++++++------- perf/remote_lat.cpp | 26 +++++++++++++------- perf/remote_thr.cpp | 26 +++++++++++++------- src/address.cpp | 26 +++++++++++++------- src/address.hpp | 26 +++++++++++++------- src/array.hpp | 26 +++++++++++++------- src/atomic_counter.hpp | 26 +++++++++++++------- src/atomic_ptr.hpp | 26 +++++++++++++------- src/blob.hpp | 26 +++++++++++++------- src/client.cpp | 26 +++++++++++++------- src/client.hpp | 26 +++++++++++++------- src/clock.cpp | 26 +++++++++++++------- src/clock.hpp | 26 +++++++++++++------- src/command.hpp | 26 +++++++++++++------- src/condition_variable.hpp | 26 +++++++++++++------- src/config.hpp | 26 +++++++++++++------- src/ctx.cpp | 26 +++++++++++++------- src/ctx.hpp | 26 +++++++++++++------- src/curve_client.cpp | 26 +++++++++++++------- src/curve_client.hpp | 26 +++++++++++++------- src/curve_server.cpp | 26 +++++++++++++------- src/curve_server.hpp | 26 +++++++++++++------- src/dbuffer.hpp | 26 +++++++++++++------- src/dealer.cpp | 26 +++++++++++++------- src/dealer.hpp | 26 +++++++++++++------- src/decoder.hpp | 26 +++++++++++++------- src/devpoll.cpp | 26 +++++++++++++------- src/devpoll.hpp | 26 +++++++++++++------- src/dist.cpp | 26 +++++++++++++------- src/dist.hpp | 26 +++++++++++++------- src/encoder.hpp | 26 +++++++++++++------- src/epoll.cpp | 26 +++++++++++++------- src/epoll.hpp | 26 +++++++++++++------- src/err.cpp | 26 +++++++++++++------- src/err.hpp | 26 +++++++++++++------- src/fd.hpp | 26 +++++++++++++------- src/fq.cpp | 26 +++++++++++++------- src/fq.hpp | 26 +++++++++++++------- src/gssapi_client.cpp | 26 +++++++++++++------- src/gssapi_client.hpp | 26 +++++++++++++------- src/gssapi_mechanism_base.cpp | 26 +++++++++++++------- src/gssapi_mechanism_base.hpp | 26 +++++++++++++------- src/gssapi_server.cpp | 26 +++++++++++++------- src/gssapi_server.hpp | 26 +++++++++++++------- src/i_decoder.hpp | 26 +++++++++++++------- src/i_encoder.hpp | 26 +++++++++++++------- src/i_engine.hpp | 26 +++++++++++++------- src/i_mailbox.hpp | 26 +++++++++++++------- src/i_poll_events.hpp | 28 +++++++++++++++------- src/io_object.cpp | 26 +++++++++++++------- src/io_object.hpp | 26 +++++++++++++------- src/io_thread.cpp | 26 +++++++++++++------- src/io_thread.hpp | 26 +++++++++++++------- src/ip.cpp | 26 +++++++++++++------- src/ip.hpp | 26 +++++++++++++------- src/ipc_address.cpp | 26 +++++++++++++------- src/ipc_address.hpp | 26 +++++++++++++------- src/ipc_connecter.cpp | 26 +++++++++++++------- src/ipc_connecter.hpp | 26 +++++++++++++------- src/ipc_listener.cpp | 26 +++++++++++++------- src/ipc_listener.hpp | 26 +++++++++++++------- src/kqueue.cpp | 26 +++++++++++++------- src/kqueue.hpp | 26 +++++++++++++------- src/lb.cpp | 26 +++++++++++++------- src/lb.hpp | 26 +++++++++++++------- src/likely.hpp | 26 +++++++++++++------- src/mailbox.cpp | 26 +++++++++++++------- src/mailbox.hpp | 26 +++++++++++++------- src/mailbox_safe.cpp | 26 +++++++++++++------- src/mailbox_safe.hpp | 27 +++++++++++++-------- src/mechanism.cpp | 26 +++++++++++++------- src/mechanism.hpp | 26 +++++++++++++------- src/metadata.cpp | 26 +++++++++++++------- src/metadata.hpp | 26 +++++++++++++------- src/msg.cpp | 26 +++++++++++++------- src/msg.hpp | 26 +++++++++++++------- src/mtrie.cpp | 26 +++++++++++++------- src/mtrie.hpp | 26 +++++++++++++------- src/mutex.hpp | 26 +++++++++++++------- src/null_mechanism.cpp | 26 +++++++++++++------- src/null_mechanism.hpp | 26 +++++++++++++------- src/object.cpp | 26 +++++++++++++------- src/object.hpp | 26 +++++++++++++------- src/options.cpp | 26 +++++++++++++------- src/options.hpp | 26 +++++++++++++------- src/own.cpp | 26 +++++++++++++------- src/own.hpp | 26 +++++++++++++------- src/pair.cpp | 26 +++++++++++++------- src/pair.hpp | 26 +++++++++++++------- src/pgm_receiver.cpp | 26 +++++++++++++------- src/pgm_receiver.hpp | 26 +++++++++++++------- src/pgm_sender.cpp | 26 +++++++++++++------- src/pgm_sender.hpp | 26 +++++++++++++------- src/pgm_socket.cpp | 26 +++++++++++++------- src/pgm_socket.hpp | 26 +++++++++++++------- src/pipe.cpp | 26 +++++++++++++------- src/pipe.hpp | 26 +++++++++++++------- src/plain_client.cpp | 26 +++++++++++++------- src/plain_client.hpp | 26 +++++++++++++------- src/plain_server.cpp | 26 +++++++++++++------- src/plain_server.hpp | 26 +++++++++++++------- src/poll.cpp | 26 +++++++++++++------- src/poll.hpp | 26 +++++++++++++------- src/poller.hpp | 26 +++++++++++++------- src/poller_base.cpp | 26 +++++++++++++------- src/poller_base.hpp | 26 +++++++++++++------- src/precompiled.cpp | 26 +++++++++++++------- src/precompiled.hpp | 26 +++++++++++++------- src/proxy.cpp | 26 +++++++++++++------- src/proxy.hpp | 26 +++++++++++++------- src/pub.cpp | 26 +++++++++++++------- src/pub.hpp | 26 +++++++++++++------- src/pull.cpp | 26 +++++++++++++------- src/pull.hpp | 26 +++++++++++++------- src/push.cpp | 26 +++++++++++++------- src/push.hpp | 26 +++++++++++++------- src/random.cpp | 26 +++++++++++++------- src/random.hpp | 26 +++++++++++++------- src/raw_decoder.cpp | 26 +++++++++++++------- src/raw_decoder.hpp | 26 +++++++++++++------- src/raw_encoder.cpp | 26 +++++++++++++------- src/raw_encoder.hpp | 26 +++++++++++++------- src/reaper.cpp | 26 +++++++++++++------- src/reaper.hpp | 26 +++++++++++++------- src/rep.cpp | 26 +++++++++++++------- src/rep.hpp | 26 +++++++++++++------- src/req.cpp | 26 +++++++++++++------- src/req.hpp | 26 +++++++++++++------- src/router.cpp | 26 +++++++++++++------- src/router.hpp | 26 +++++++++++++------- src/select.cpp | 26 +++++++++++++------- src/select.hpp | 26 +++++++++++++------- src/server.cpp | 26 +++++++++++++------- src/server.hpp | 26 +++++++++++++------- src/session_base.cpp | 26 +++++++++++++------- src/session_base.hpp | 26 +++++++++++++------- src/signaler.cpp | 26 +++++++++++++------- src/signaler.hpp | 26 +++++++++++++------- src/socket_base.cpp | 26 +++++++++++++------- src/socket_base.hpp | 26 +++++++++++++------- src/socks.cpp | 26 +++++++++++++------- src/socks.hpp | 26 +++++++++++++------- src/socks_connecter.cpp | 26 +++++++++++++------- src/socks_connecter.hpp | 26 +++++++++++++------- src/stdint.hpp | 26 +++++++++++++------- src/stream.cpp | 26 +++++++++++++------- src/stream.hpp | 26 +++++++++++++------- src/stream_engine.cpp | 26 +++++++++++++------- src/stream_engine.hpp | 26 +++++++++++++------- src/sub.cpp | 26 +++++++++++++------- src/sub.hpp | 26 +++++++++++++------- src/tcp.cpp | 26 +++++++++++++------- src/tcp.hpp | 26 +++++++++++++------- src/tcp_address.cpp | 26 +++++++++++++------- src/tcp_address.hpp | 26 +++++++++++++------- src/tcp_connecter.cpp | 26 +++++++++++++------- src/tcp_connecter.hpp | 26 +++++++++++++------- src/tcp_listener.cpp | 26 +++++++++++++------- src/tcp_listener.hpp | 26 +++++++++++++------- src/thread.cpp | 26 +++++++++++++------- src/thread.hpp | 26 +++++++++++++------- src/tipc_address.cpp | 26 +++++++++++++------- src/tipc_address.hpp | 26 +++++++++++++------- src/tipc_connecter.cpp | 26 +++++++++++++------- src/tipc_connecter.hpp | 26 +++++++++++++------- src/tipc_listener.cpp | 26 +++++++++++++------- src/tipc_listener.hpp | 26 +++++++++++++------- src/trie.cpp | 26 +++++++++++++------- src/trie.hpp | 26 +++++++++++++------- src/v1_decoder.cpp | 26 +++++++++++++------- src/v1_decoder.hpp | 26 +++++++++++++------- src/v1_encoder.cpp | 26 +++++++++++++------- src/v1_encoder.hpp | 26 +++++++++++++------- src/v2_decoder.cpp | 26 +++++++++++++------- src/v2_decoder.hpp | 26 +++++++++++++------- src/v2_encoder.cpp | 26 +++++++++++++------- src/v2_encoder.hpp | 26 +++++++++++++------- src/v2_protocol.hpp | 26 +++++++++++++------- src/windows.hpp | 26 +++++++++++++------- src/wire.hpp | 26 +++++++++++++------- src/xpub.cpp | 26 +++++++++++++------- src/xpub.hpp | 26 +++++++++++++------- src/xsub.cpp | 26 +++++++++++++------- src/xsub.hpp | 26 +++++++++++++------- src/ypipe.hpp | 26 +++++++++++++------- src/ypipe_base.hpp | 26 +++++++++++++------- src/ypipe_conflate.hpp | 26 +++++++++++++------- src/yqueue.hpp | 26 +++++++++++++------- src/zmq.cpp | 26 +++++++++++++------- src/zmq_utils.cpp | 26 +++++++++++++------- tests/test_abstract_ipc.cpp | 26 +++++++++++++------- tests/test_atomics.cpp | 26 +++++++++++++------- tests/test_bind_src_address.cpp | 26 +++++++++++++------- tests/test_capabilities.cpp | 26 +++++++++++++------- tests/test_client_drop_more.cpp | 26 +++++++++++++------- tests/test_client_server.cpp | 26 +++++++++++++------- tests/test_conflate.cpp | 26 +++++++++++++------- tests/test_connect_delay_tipc.cpp | 26 +++++++++++++------- tests/test_connect_resolve.cpp | 26 +++++++++++++------- tests/test_connect_rid.cpp | 26 +++++++++++++------- tests/test_ctx_destroy.cpp | 26 +++++++++++++------- tests/test_ctx_options.cpp | 26 +++++++++++++------- tests/test_diffserv.cpp | 26 +++++++++++++------- tests/test_disconnect_inproc.cpp | 26 +++++++++++++------- tests/test_filter_ipc.cpp | 26 +++++++++++++------- tests/test_fork.cpp | 26 +++++++++++++------- tests/test_hwm.cpp | 26 +++++++++++++------- tests/test_hwm_pubsub.cpp | 26 +++++++++++++------- tests/test_immediate.cpp | 26 +++++++++++++------- tests/test_inproc_connect.cpp | 26 +++++++++++++------- tests/test_invalid_rep.cpp | 26 +++++++++++++------- tests/test_iov.cpp | 26 +++++++++++++------- tests/test_ipc_wildcard.cpp | 26 +++++++++++++------- tests/test_issue_566.cpp | 26 +++++++++++++------- tests/test_last_endpoint.cpp | 26 +++++++++++++------- tests/test_many_sockets.cpp | 26 +++++++++++++------- tests/test_metadata.cpp | 26 +++++++++++++------- tests/test_monitor.cpp | 26 +++++++++++++------- tests/test_msg_flags.cpp | 26 +++++++++++++------- tests/test_pair_inproc.cpp | 26 +++++++++++++------- tests/test_pair_ipc.cpp | 26 +++++++++++++------- tests/test_pair_tcp.cpp | 26 +++++++++++++------- tests/test_pair_tipc.cpp | 26 +++++++++++++------- tests/test_probe_router.cpp | 26 +++++++++++++------- tests/test_proxy.cpp | 26 +++++++++++++------- tests/test_proxy_terminate.cpp | 26 +++++++++++++------- tests/test_pub_invert_matching.cpp | 26 +++++++++++++------- tests/test_req_correlate.cpp | 26 +++++++++++++------- tests/test_req_relaxed.cpp | 26 +++++++++++++------- tests/test_reqrep_device.cpp | 26 +++++++++++++------- tests/test_reqrep_device_tipc.cpp | 26 +++++++++++++------- tests/test_reqrep_inproc.cpp | 26 +++++++++++++------- tests/test_reqrep_ipc.cpp | 26 +++++++++++++------- tests/test_reqrep_tcp.cpp | 26 +++++++++++++------- tests/test_reqrep_tipc.cpp | 26 +++++++++++++------- tests/test_router_handover.cpp | 26 +++++++++++++------- tests/test_router_mandatory.cpp | 26 +++++++++++++------- tests/test_router_mandatory_hwm.cpp | 26 +++++++++++++------- tests/test_router_mandatory_tipc.cpp | 26 +++++++++++++------- tests/test_security_curve.cpp | 26 +++++++++++++------- tests/test_security_null.cpp | 26 +++++++++++++------- tests/test_security_plain.cpp | 26 +++++++++++++------- tests/test_server_drop_more.cpp | 26 +++++++++++++------- tests/test_shutdown_stress.cpp | 26 +++++++++++++------- tests/test_shutdown_stress_tipc.cpp | 26 +++++++++++++------- tests/test_spec_dealer.cpp | 26 +++++++++++++------- tests/test_spec_pushpull.cpp | 26 +++++++++++++------- tests/test_spec_rep.cpp | 26 +++++++++++++------- tests/test_spec_req.cpp | 26 +++++++++++++------- tests/test_spec_router.cpp | 26 +++++++++++++------- tests/test_srcfd.cpp | 26 +++++++++++++------- tests/test_stream.cpp | 26 +++++++++++++------- tests/test_stream_disconnect.cpp | 26 +++++++++++++------- tests/test_stream_empty.cpp | 26 +++++++++++++------- tests/test_stream_timeout.cpp | 26 +++++++++++++------- tests/test_sub_forward.cpp | 26 +++++++++++++------- tests/test_sub_forward_tipc.cpp | 26 +++++++++++++------- tests/test_system.cpp | 26 +++++++++++++------- tests/test_term_endpoint.cpp | 26 +++++++++++++------- tests/test_term_endpoint_tipc.cpp | 26 +++++++++++++------- tests/test_thread_safe.cpp | 26 +++++++++++++------- tests/test_timeo.cpp | 26 +++++++++++++------- tests/test_xpub_manual.cpp | 26 +++++++++++++------- tests/test_xpub_nodrop.cpp | 26 +++++++++++++------- tests/test_xpub_welcome_msg.cpp | 26 +++++++++++++------- tests/testutil.hpp | 26 +++++++++++++------- tools/curve_keygen.cpp | 35 ++++++++++++++------------- 275 files changed, 4958 insertions(+), 2220 deletions(-) diff --git a/builds/mingw32/platform.hpp b/builds/mingw32/platform.hpp index 4af872cd..c255ff68 100644 --- a/builds/mingw32/platform.hpp +++ b/builds/mingw32/platform.hpp @@ -1,18 +1,27 @@ /* - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/builds/msvc/platform.hpp b/builds/msvc/platform.hpp index 4af872cd..c255ff68 100644 --- a/builds/msvc/platform.hpp +++ b/builds/msvc/platform.hpp @@ -1,18 +1,27 @@ /* - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/builds/zos/test_fork.cpp b/builds/zos/test_fork.cpp index f0a9f22a..3273ceb6 100644 --- a/builds/zos/test_fork.cpp +++ b/builds/zos/test_fork.cpp @@ -1,17 +1,27 @@ /* - Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . @@ -30,7 +40,7 @@ int main (void) setup_test_environment (); void *ctx = zmq_ctx_new (); assert (ctx); - + // Create and bind pull socket to receive messages void *pull = zmq_socket (ctx, ZMQ_PULL); assert (pull); @@ -54,11 +64,11 @@ int main (void) int count; for (count = 0; count < NUM_MESSAGES; count++) zmq_send (push, "Hello", 5, 0); - + zmq_close (push); zmq_ctx_destroy (child_ctx); exit (0); - } + } else { // Parent process alarm(TIMEOUT_SECS); // Set upper limit on runtime @@ -72,7 +82,7 @@ int main (void) int child_status; while (true) { rc = waitpid (pid, &child_status, 0); - if (rc == -1 && errno == EINTR) + if (rc == -1 && errno == EINTR) continue; assert (rc > 0); // Verify the status code of the child was zero diff --git a/include/zmq.h b/include/zmq.h index e9cf5933..c99338c5 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/include/zmq_utils.h b/include/zmq_utils.h index 3392a8e0..dd8ea3b7 100644 --- a/include/zmq_utils.h +++ b/include/zmq_utils.h @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp index 5c221f15..0a265ccb 100644 --- a/perf/inproc_lat.cpp +++ b/perf/inproc_lat.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp index 22116fc1..5dcbabd7 100644 --- a/perf/inproc_thr.cpp +++ b/perf/inproc_thr.cpp @@ -3,17 +3,27 @@ Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp index 683f730b..27fb5413 100644 --- a/perf/local_lat.cpp +++ b/perf/local_lat.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp index fb88ed83..0eb86253 100644 --- a/perf/local_thr.cpp +++ b/perf/local_thr.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp index f292861c..9bf667ec 100644 --- a/perf/remote_lat.cpp +++ b/perf/remote_lat.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp index 5a0072d4..d54bb89a 100644 --- a/perf/remote_thr.cpp +++ b/perf/remote_thr.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/address.cpp b/src/address.cpp index 0f4b7fd6..c8697ecc 100644 --- a/src/address.cpp +++ b/src/address.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/address.hpp b/src/address.hpp index 1ea72ace..28421f06 100644 --- a/src/address.hpp +++ b/src/address.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/array.hpp b/src/array.hpp index 5acf834e..35e3c405 100644 --- a/src/array.hpp +++ b/src/array.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index 79a49a15..01d7d195 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index dc44a34a..14bc3741 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/blob.hpp b/src/blob.hpp index eebaf68d..689b60b2 100644 --- a/src/blob.hpp +++ b/src/blob.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/client.cpp b/src/client.cpp index f30b43c9..fb0ccf19 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/client.hpp b/src/client.hpp index 8c9e2ad5..38cd4618 100644 --- a/src/client.hpp +++ b/src/client.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/clock.cpp b/src/clock.cpp index a499cf0a..bb307401 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/clock.hpp b/src/clock.hpp index e7eeb900..0d988193 100644 --- a/src/clock.hpp +++ b/src/clock.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/command.hpp b/src/command.hpp index bb3cab2b..a19cea5f 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/condition_variable.hpp b/src/condition_variable.hpp index fbcad36a..6c588bfb 100644 --- a/src/condition_variable.hpp +++ b/src/condition_variable.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/config.hpp b/src/config.hpp index fd700a44..b483c469 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ctx.cpp b/src/ctx.cpp index 6f5c7b67..d61cc2f3 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ctx.hpp b/src/ctx.hpp index 5b78107b..4dfd062a 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/curve_client.cpp b/src/curve_client.cpp index 70c15e3b..0b25b32c 100644 --- a/src/curve_client.cpp +++ b/src/curve_client.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/curve_client.hpp b/src/curve_client.hpp index 73f24500..ffae1236 100644 --- a/src/curve_client.hpp +++ b/src/curve_client.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/curve_server.cpp b/src/curve_server.cpp index 91b5d6a9..e85b10b8 100644 --- a/src/curve_server.cpp +++ b/src/curve_server.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/curve_server.hpp b/src/curve_server.hpp index 1c22a365..fe7cf877 100644 --- a/src/curve_server.hpp +++ b/src/curve_server.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/dbuffer.hpp b/src/dbuffer.hpp index 2b3fc973..46fe2441 100644 --- a/src/dbuffer.hpp +++ b/src/dbuffer.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/dealer.cpp b/src/dealer.cpp index 460b4932..2a3a5aa3 100644 --- a/src/dealer.cpp +++ b/src/dealer.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/dealer.hpp b/src/dealer.hpp index 1e63d64d..3b1d636a 100644 --- a/src/dealer.hpp +++ b/src/dealer.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/decoder.hpp b/src/decoder.hpp index fd844eee..fc4b177d 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/devpoll.cpp b/src/devpoll.cpp index fbd8a55f..6c97256e 100644 --- a/src/devpoll.cpp +++ b/src/devpoll.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/devpoll.hpp b/src/devpoll.hpp index dc2a979f..5d77b8fc 100644 --- a/src/devpoll.hpp +++ b/src/devpoll.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/dist.cpp b/src/dist.cpp index 35cdb445..aa27b4b3 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/dist.hpp b/src/dist.hpp index cff530e7..97b476ba 100644 --- a/src/dist.hpp +++ b/src/dist.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/encoder.hpp b/src/encoder.hpp index f4586bd9..0f0d54ea 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/epoll.cpp b/src/epoll.cpp index 1f029b77..1de68c52 100644 --- a/src/epoll.cpp +++ b/src/epoll.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/epoll.hpp b/src/epoll.hpp index a2be110b..8f79343c 100644 --- a/src/epoll.hpp +++ b/src/epoll.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/err.cpp b/src/err.cpp index 6c22add7..bf9f88a0 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/err.hpp b/src/err.hpp index ebb0fe19..3dc8d841 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/fd.hpp b/src/fd.hpp index 2464b6bf..315c7fae 100644 --- a/src/fd.hpp +++ b/src/fd.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/fq.cpp b/src/fq.cpp index 9759131d..9269eb20 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/fq.hpp b/src/fq.hpp index ac4519f7..6c06c691 100644 --- a/src/fq.hpp +++ b/src/fq.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_client.cpp b/src/gssapi_client.cpp index 9c110e03..3373c7ed 100644 --- a/src/gssapi_client.cpp +++ b/src/gssapi_client.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_client.hpp b/src/gssapi_client.hpp index e01e76bb..7bc9d5af 100644 --- a/src/gssapi_client.hpp +++ b/src/gssapi_client.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_mechanism_base.cpp b/src/gssapi_mechanism_base.cpp index 12a7a8f8..355f1528 100644 --- a/src/gssapi_mechanism_base.cpp +++ b/src/gssapi_mechanism_base.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_mechanism_base.hpp b/src/gssapi_mechanism_base.hpp index b9429cdc..1e26a950 100644 --- a/src/gssapi_mechanism_base.hpp +++ b/src/gssapi_mechanism_base.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_server.cpp b/src/gssapi_server.cpp index 08840110..97f3f9b5 100644 --- a/src/gssapi_server.cpp +++ b/src/gssapi_server.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/gssapi_server.hpp b/src/gssapi_server.hpp index 34fe72ac..c3782230 100644 --- a/src/gssapi_server.hpp +++ b/src/gssapi_server.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/i_decoder.hpp b/src/i_decoder.hpp index 37233692..b003cf81 100644 --- a/src/i_decoder.hpp +++ b/src/i_decoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/i_encoder.hpp b/src/i_encoder.hpp index 31e60173..eb341e57 100644 --- a/src/i_encoder.hpp +++ b/src/i_encoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/i_engine.hpp b/src/i_engine.hpp index 13ddfa03..7a61e8e9 100644 --- a/src/i_engine.hpp +++ b/src/i_engine.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/i_mailbox.hpp b/src/i_mailbox.hpp index 8f472d38..7500b0b3 100644 --- a/src/i_mailbox.hpp +++ b/src/i_mailbox.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/i_poll_events.hpp b/src/i_poll_events.hpp index ec84f568..d502784b 100644 --- a/src/i_poll_events.hpp +++ b/src/i_poll_events.hpp @@ -1,20 +1,30 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . */ #ifndef __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__ diff --git a/src/io_object.cpp b/src/io_object.cpp index d15e774e..71067bc0 100644 --- a/src/io_object.cpp +++ b/src/io_object.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/io_object.hpp b/src/io_object.hpp index 0d13b3bd..d414678d 100644 --- a/src/io_object.hpp +++ b/src/io_object.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/io_thread.cpp b/src/io_thread.cpp index 29c1aea6..8c394d4a 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/io_thread.hpp b/src/io_thread.hpp index 0b1ac742..b1f0e3e9 100644 --- a/src/io_thread.hpp +++ b/src/io_thread.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ip.cpp b/src/ip.cpp index 15ef176c..d17f19c9 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ip.hpp b/src/ip.hpp index ec95621c..7ea3f15a 100644 --- a/src/ip.hpp +++ b/src/ip.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_address.cpp b/src/ipc_address.cpp index b9664e40..ba247600 100644 --- a/src/ipc_address.cpp +++ b/src/ipc_address.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_address.hpp b/src/ipc_address.hpp index 2e27293e..27c299aa 100644 --- a/src/ipc_address.hpp +++ b/src/ipc_address.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index 2028f584..d6ee5f16 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_connecter.hpp b/src/ipc_connecter.hpp index 491bf08d..5c032063 100644 --- a/src/ipc_connecter.hpp +++ b/src/ipc_connecter.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp index 744adf96..995f58fb 100644 --- a/src/ipc_listener.cpp +++ b/src/ipc_listener.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ipc_listener.hpp b/src/ipc_listener.hpp index b5714f73..445f96ba 100644 --- a/src/ipc_listener.hpp +++ b/src/ipc_listener.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/kqueue.cpp b/src/kqueue.cpp index 5057b85f..3095ab7a 100644 --- a/src/kqueue.cpp +++ b/src/kqueue.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/kqueue.hpp b/src/kqueue.hpp index 43da1ba3..b6680b6a 100644 --- a/src/kqueue.hpp +++ b/src/kqueue.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/lb.cpp b/src/lb.cpp index df19a987..44b11ea7 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/lb.hpp b/src/lb.hpp index 0f9922c1..b43a8ff1 100644 --- a/src/lb.hpp +++ b/src/lb.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/likely.hpp b/src/likely.hpp index 64975188..b7f5ef27 100644 --- a/src/likely.hpp +++ b/src/likely.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mailbox.cpp b/src/mailbox.cpp index c4b98307..e3c2e8a1 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mailbox.hpp b/src/mailbox.hpp index b9a7cfd0..a7b5bb04 100644 --- a/src/mailbox.hpp +++ b/src/mailbox.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mailbox_safe.cpp b/src/mailbox_safe.cpp index 9aa73766..cd2b6103 100644 --- a/src/mailbox_safe.cpp +++ b/src/mailbox_safe.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mailbox_safe.hpp b/src/mailbox_safe.hpp index ae467e74..ecbead53 100644 --- a/src/mailbox_safe.hpp +++ b/src/mailbox_safe.hpp @@ -1,20 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - void send (const command_t &cmd_); - int recv (command_t *cmd_, int timeout_); + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mechanism.cpp b/src/mechanism.cpp index c075179b..a3eb9d4f 100644 --- a/src/mechanism.cpp +++ b/src/mechanism.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mechanism.hpp b/src/mechanism.hpp index d39f5824..1c7c01ba 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/metadata.cpp b/src/metadata.cpp index 1e2e192c..930695f5 100644 --- a/src/metadata.cpp +++ b/src/metadata.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/metadata.hpp b/src/metadata.hpp index c4d1e024..308b879d 100644 --- a/src/metadata.hpp +++ b/src/metadata.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/msg.cpp b/src/msg.cpp index da82a3a8..a134a5b0 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/msg.hpp b/src/msg.hpp index 265561c8..647c1a20 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mtrie.cpp b/src/mtrie.cpp index fa8f9c58..6f7c5898 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mtrie.hpp b/src/mtrie.hpp index 7159967d..6d49380c 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/mutex.hpp b/src/mutex.hpp index ae68e786..36bd73f8 100644 --- a/src/mutex.hpp +++ b/src/mutex.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/null_mechanism.cpp b/src/null_mechanism.cpp index b13dbeaf..d9157e20 100644 --- a/src/null_mechanism.cpp +++ b/src/null_mechanism.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/null_mechanism.hpp b/src/null_mechanism.hpp index 17b952f3..ff1eb96d 100644 --- a/src/null_mechanism.hpp +++ b/src/null_mechanism.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/object.cpp b/src/object.cpp index 565585f2..a82256d3 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/object.hpp b/src/object.hpp index 9b7ad831..73e5a9e2 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/options.cpp b/src/options.cpp index 29eb45c8..0806bf77 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/options.hpp b/src/options.hpp index eae018ce..0517f341 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/own.cpp b/src/own.cpp index 4377ec4d..33502126 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/own.hpp b/src/own.hpp index e64596e8..40be503f 100644 --- a/src/own.hpp +++ b/src/own.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pair.cpp b/src/pair.cpp index 13210842..ee2da2b2 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pair.hpp b/src/pair.hpp index 53f6e263..f7f74a39 100644 --- a/src/pair.hpp +++ b/src/pair.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index cbc6495c..035a4cc2 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index e2604a5b..d69af762 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index b03e0046..e18deff4 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp index 147cbc6e..1e6cd0a7 100644 --- a/src/pgm_sender.hpp +++ b/src/pgm_sender.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 7e94d592..02655797 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp index 71085715..4547c4d6 100644 --- a/src/pgm_socket.hpp +++ b/src/pgm_socket.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pipe.cpp b/src/pipe.cpp index a58a6f2d..15742aac 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pipe.hpp b/src/pipe.hpp index bdf41fd4..43d42050 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/plain_client.cpp b/src/plain_client.cpp index 22f4b48c..04be39f3 100644 --- a/src/plain_client.cpp +++ b/src/plain_client.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/plain_client.hpp b/src/plain_client.hpp index 95cf8ccf..b00fe17a 100644 --- a/src/plain_client.hpp +++ b/src/plain_client.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/plain_server.cpp b/src/plain_server.cpp index 6a818927..75c54d4a 100644 --- a/src/plain_server.cpp +++ b/src/plain_server.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/plain_server.hpp b/src/plain_server.hpp index 0c472624..6cde4c71 100644 --- a/src/plain_server.hpp +++ b/src/plain_server.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/poll.cpp b/src/poll.cpp index 98cbfd44..74484e31 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/poll.hpp b/src/poll.hpp index acad27fe..227e51c7 100644 --- a/src/poll.hpp +++ b/src/poll.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/poller.hpp b/src/poller.hpp index 2cdff160..b91e551c 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/poller_base.cpp b/src/poller_base.cpp index 3ed36460..532d3072 100644 --- a/src/poller_base.cpp +++ b/src/poller_base.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/poller_base.hpp b/src/poller_base.hpp index e3aee9fa..41720e38 100644 --- a/src/poller_base.hpp +++ b/src/poller_base.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/precompiled.cpp b/src/precompiled.cpp index 87fa08ce..7cd571dc 100644 --- a/src/precompiled.cpp +++ b/src/precompiled.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/precompiled.hpp b/src/precompiled.hpp index bcdcac05..36447d21 100644 --- a/src/precompiled.hpp +++ b/src/precompiled.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/proxy.cpp b/src/proxy.cpp index 0db8fdc3..88ffbb08 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/proxy.hpp b/src/proxy.hpp index c65738c3..14b056cd 100644 --- a/src/proxy.hpp +++ b/src/proxy.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pub.cpp b/src/pub.cpp index 7895fb86..7e6eee43 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pub.hpp b/src/pub.hpp index f5359f0b..4a70dcc2 100644 --- a/src/pub.hpp +++ b/src/pub.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pull.cpp b/src/pull.cpp index 5e911ef7..4754cda1 100644 --- a/src/pull.cpp +++ b/src/pull.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/pull.hpp b/src/pull.hpp index d8282705..6a2f953a 100644 --- a/src/pull.hpp +++ b/src/pull.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/push.cpp b/src/push.cpp index d2531044..65fac5ff 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/push.hpp b/src/push.hpp index fba577a7..238ce82f 100644 --- a/src/push.hpp +++ b/src/push.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/random.cpp b/src/random.cpp index 1a603b30..5c9932b6 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/random.hpp b/src/random.hpp index 332f988d..bd47c611 100644 --- a/src/random.hpp +++ b/src/random.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/raw_decoder.cpp b/src/raw_decoder.cpp index 2340bec6..b98826cb 100644 --- a/src/raw_decoder.cpp +++ b/src/raw_decoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/raw_decoder.hpp b/src/raw_decoder.hpp index 65779acc..fc88add1 100644 --- a/src/raw_decoder.hpp +++ b/src/raw_decoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/raw_encoder.cpp b/src/raw_encoder.cpp index 9c9b5b1b..d0881aae 100644 --- a/src/raw_encoder.cpp +++ b/src/raw_encoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/raw_encoder.hpp b/src/raw_encoder.hpp index 67d9c4e3..417cff4a 100644 --- a/src/raw_encoder.hpp +++ b/src/raw_encoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/reaper.cpp b/src/reaper.cpp index 16916afd..ea5f0c56 100644 --- a/src/reaper.cpp +++ b/src/reaper.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/reaper.hpp b/src/reaper.hpp index 8f9d243b..25a6186f 100644 --- a/src/reaper.hpp +++ b/src/reaper.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/rep.cpp b/src/rep.cpp index 8482adbb..0efdec9c 100644 --- a/src/rep.cpp +++ b/src/rep.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/rep.hpp b/src/rep.hpp index 08b09a8a..177872e4 100644 --- a/src/rep.hpp +++ b/src/rep.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/req.cpp b/src/req.cpp index 09e16385..3a930349 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/req.hpp b/src/req.hpp index 92b98ed7..66512cae 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/router.cpp b/src/router.cpp index ac8e124d..018cffb1 100644 --- a/src/router.cpp +++ b/src/router.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/router.hpp b/src/router.hpp index 30c95fe8..90cc78f1 100644 --- a/src/router.hpp +++ b/src/router.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/select.cpp b/src/select.cpp index 1b54243d..ec0d2e82 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/select.hpp b/src/select.hpp index 61ce07d6..0eb29ec9 100644 --- a/src/select.hpp +++ b/src/select.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/server.cpp b/src/server.cpp index 7fb77098..3b1a7fcb 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/server.hpp b/src/server.hpp index 2fb642be..27eb0c38 100644 --- a/src/server.hpp +++ b/src/server.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/session_base.cpp b/src/session_base.cpp index 0eb7998e..9b2bcf78 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/session_base.hpp b/src/session_base.hpp index ba209f8a..8730c271 100644 --- a/src/session_base.hpp +++ b/src/session_base.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/signaler.cpp b/src/signaler.cpp index 914b9c1c..e6fa9833 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/signaler.hpp b/src/signaler.hpp index 1fb02712..1ab25dc2 100644 --- a/src/signaler.hpp +++ b/src/signaler.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 84234486..a60ac62e 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socket_base.hpp b/src/socket_base.hpp index d3dcc459..682b8c75 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socks.cpp b/src/socks.cpp index 50e8612e..d08154cd 100644 --- a/src/socks.cpp +++ b/src/socks.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socks.hpp b/src/socks.hpp index 14b663a4..35d80265 100644 --- a/src/socks.hpp +++ b/src/socks.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index b6c789b3..bdc435ec 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/socks_connecter.hpp b/src/socks_connecter.hpp index 263a0bd9..a3c5a94f 100644 --- a/src/socks_connecter.hpp +++ b/src/socks_connecter.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/stdint.hpp b/src/stdint.hpp index f08488e9..50ee6fec 100644 --- a/src/stdint.hpp +++ b/src/stdint.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/stream.cpp b/src/stream.cpp index 2125e346..6ed9dd77 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/stream.hpp b/src/stream.hpp index 99b612f6..304ab23e 100644 --- a/src/stream.hpp +++ b/src/stream.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 2cd02f69..7d750b73 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index df91357f..fad77f57 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/sub.cpp b/src/sub.cpp index 1105e894..831230ad 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/sub.hpp b/src/sub.hpp index aa9a3f0a..1615effa 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp.cpp b/src/tcp.cpp index 5d7ef7d5..21814104 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp.hpp b/src/tcp.hpp index c4e8a113..bb8ee7a3 100644 --- a/src/tcp.hpp +++ b/src/tcp.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index 70391da1..c8689322 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_address.hpp b/src/tcp_address.hpp index 55eac63a..31e8c2a5 100644 --- a/src/tcp_address.hpp +++ b/src/tcp_address.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index d36a9144..17239a74 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_connecter.hpp b/src/tcp_connecter.hpp index f1e61a8c..340c7f56 100644 --- a/src/tcp_connecter.hpp +++ b/src/tcp_connecter.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index 343da58d..26cc3f0f 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp index 430cb22a..4b9dc7ed 100644 --- a/src/tcp_listener.hpp +++ b/src/tcp_listener.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/thread.cpp b/src/thread.cpp index 03758d27..ad17cdea 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/thread.hpp b/src/thread.hpp index d4c7f772..567323c5 100644 --- a/src/thread.hpp +++ b/src/thread.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_address.cpp b/src/tipc_address.cpp index a8568dbb..07f83ae8 100644 --- a/src/tipc_address.cpp +++ b/src/tipc_address.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_address.hpp b/src/tipc_address.hpp index 22f1f09a..0d6baa20 100644 --- a/src/tipc_address.hpp +++ b/src/tipc_address.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_connecter.cpp b/src/tipc_connecter.cpp index 62b063cb..11b53c50 100644 --- a/src/tipc_connecter.cpp +++ b/src/tipc_connecter.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_connecter.hpp b/src/tipc_connecter.hpp index 4c3d8785..6bfc7677 100644 --- a/src/tipc_connecter.hpp +++ b/src/tipc_connecter.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_listener.cpp b/src/tipc_listener.cpp index b52dd760..fb8df6c3 100644 --- a/src/tipc_listener.cpp +++ b/src/tipc_listener.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/tipc_listener.hpp b/src/tipc_listener.hpp index 928a24bb..06d201ac 100644 --- a/src/tipc_listener.hpp +++ b/src/tipc_listener.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/trie.cpp b/src/trie.cpp index 5c531fc1..e48cac0a 100644 --- a/src/trie.cpp +++ b/src/trie.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/trie.hpp b/src/trie.hpp index be595a6b..d714c617 100644 --- a/src/trie.hpp +++ b/src/trie.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v1_decoder.cpp b/src/v1_decoder.cpp index 5a7f8c18..a21bb2f5 100644 --- a/src/v1_decoder.cpp +++ b/src/v1_decoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v1_decoder.hpp b/src/v1_decoder.hpp index b7356967..69207236 100644 --- a/src/v1_decoder.hpp +++ b/src/v1_decoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v1_encoder.cpp b/src/v1_encoder.cpp index eb9b09b7..d77ccb25 100644 --- a/src/v1_encoder.cpp +++ b/src/v1_encoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v1_encoder.hpp b/src/v1_encoder.hpp index 559229f7..4636d190 100644 --- a/src/v1_encoder.hpp +++ b/src/v1_encoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 5079f512..394b1e9f 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index dbca2bc4..14c48e4e 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v2_encoder.cpp b/src/v2_encoder.cpp index 41d0e0c9..1adca93d 100644 --- a/src/v2_encoder.cpp +++ b/src/v2_encoder.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v2_encoder.hpp b/src/v2_encoder.hpp index 57298d52..a23f9780 100644 --- a/src/v2_encoder.hpp +++ b/src/v2_encoder.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/v2_protocol.hpp b/src/v2_protocol.hpp index 79b5670e..4233343c 100644 --- a/src/v2_protocol.hpp +++ b/src/v2_protocol.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/windows.hpp b/src/windows.hpp index 39a52698..780c4e1c 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/wire.hpp b/src/wire.hpp index 667494a8..6c2bee0e 100644 --- a/src/wire.hpp +++ b/src/wire.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/xpub.cpp b/src/xpub.cpp index a1f36ab9..fd086e9e 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/xpub.hpp b/src/xpub.hpp index 4c6f60f1..261cac44 100644 --- a/src/xpub.hpp +++ b/src/xpub.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/xsub.cpp b/src/xsub.cpp index ddbc8f9f..615bab78 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/xsub.hpp b/src/xsub.hpp index a38b4830..3a15fe7f 100644 --- a/src/xsub.hpp +++ b/src/xsub.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ypipe.hpp b/src/ypipe.hpp index 565ac043..c3f2e96d 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ypipe_base.hpp b/src/ypipe_base.hpp index 3c7dda7c..c541d2fb 100644 --- a/src/ypipe_base.hpp +++ b/src/ypipe_base.hpp @@ -2,17 +2,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/ypipe_conflate.hpp b/src/ypipe_conflate.hpp index 53d81c8f..683137a9 100644 --- a/src/ypipe_conflate.hpp +++ b/src/ypipe_conflate.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/yqueue.hpp b/src/yqueue.hpp index 114a868f..66ea8bdc 100644 --- a/src/yqueue.hpp +++ b/src/yqueue.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/zmq.cpp b/src/zmq.cpp index 8d95b6bc..91104ffc 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/src/zmq_utils.cpp b/src/zmq_utils.cpp index 59efc8cf..bdd43aed 100644 --- a/src/zmq_utils.cpp +++ b/src/zmq_utils.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_abstract_ipc.cpp b/tests/test_abstract_ipc.cpp index 584fbe0d..dbe8e7ce 100644 --- a/tests/test_abstract_ipc.cpp +++ b/tests/test_abstract_ipc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_atomics.cpp b/tests/test_atomics.cpp index 65cffef2..53efc727 100644 --- a/tests/test_atomics.cpp +++ b/tests/test_atomics.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_bind_src_address.cpp b/tests/test_bind_src_address.cpp index 59387ba8..15a5ab37 100644 --- a/tests/test_bind_src_address.cpp +++ b/tests/test_bind_src_address.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_capabilities.cpp b/tests/test_capabilities.cpp index fa6e13fe..611c90bd 100644 --- a/tests/test_capabilities.cpp +++ b/tests/test_capabilities.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_client_drop_more.cpp b/tests/test_client_drop_more.cpp index 47e1b1ae..745f24eb 100644 --- a/tests/test_client_drop_more.cpp +++ b/tests/test_client_drop_more.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_client_server.cpp b/tests/test_client_server.cpp index 1fc7915d..8793eeac 100644 --- a/tests/test_client_server.cpp +++ b/tests/test_client_server.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_conflate.cpp b/tests/test_conflate.cpp index 8a84ec9c..9acb7cb5 100644 --- a/tests/test_conflate.cpp +++ b/tests/test_conflate.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_connect_delay_tipc.cpp b/tests/test_connect_delay_tipc.cpp index eb08a4f1..1c455d5c 100644 --- a/tests/test_connect_delay_tipc.cpp +++ b/tests/test_connect_delay_tipc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_connect_resolve.cpp b/tests/test_connect_resolve.cpp index 0e655d92..0bfd7703 100644 --- a/tests/test_connect_resolve.cpp +++ b/tests/test_connect_resolve.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_connect_rid.cpp b/tests/test_connect_rid.cpp index a83ed1e4..0dd24512 100644 --- a/tests/test_connect_rid.cpp +++ b/tests/test_connect_rid.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_ctx_destroy.cpp b/tests/test_ctx_destroy.cpp index bbad5f61..8e88f5b7 100644 --- a/tests/test_ctx_destroy.cpp +++ b/tests/test_ctx_destroy.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_ctx_options.cpp b/tests/test_ctx_options.cpp index 09a166d5..0cda9048 100644 --- a/tests/test_ctx_options.cpp +++ b/tests/test_ctx_options.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_diffserv.cpp b/tests/test_diffserv.cpp index 241f83af..accee26a 100644 --- a/tests/test_diffserv.cpp +++ b/tests/test_diffserv.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_disconnect_inproc.cpp b/tests/test_disconnect_inproc.cpp index 90e7d14e..7ad80c20 100644 --- a/tests/test_disconnect_inproc.cpp +++ b/tests/test_disconnect_inproc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_filter_ipc.cpp b/tests/test_filter_ipc.cpp index 788e1436..ceb0ef47 100644 --- a/tests/test_filter_ipc.cpp +++ b/tests/test_filter_ipc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_fork.cpp b/tests/test_fork.cpp index 0fc32d43..714cf3f9 100644 --- a/tests/test_fork.cpp +++ b/tests/test_fork.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index 3e9f135f..e7ad5906 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_hwm_pubsub.cpp b/tests/test_hwm_pubsub.cpp index 83d55f42..a37bc8e6 100644 --- a/tests/test_hwm_pubsub.cpp +++ b/tests/test_hwm_pubsub.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_immediate.cpp b/tests/test_immediate.cpp index fa113a77..f442e605 100644 --- a/tests/test_immediate.cpp +++ b/tests/test_immediate.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_inproc_connect.cpp b/tests/test_inproc_connect.cpp index 2f815be3..106765db 100644 --- a/tests/test_inproc_connect.cpp +++ b/tests/test_inproc_connect.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index 988de4fe..c8c578ed 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_iov.cpp b/tests/test_iov.cpp index 8153738d..1b8702dc 100644 --- a/tests/test_iov.cpp +++ b/tests/test_iov.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_ipc_wildcard.cpp b/tests/test_ipc_wildcard.cpp index 89b1012f..16e533a5 100644 --- a/tests/test_ipc_wildcard.cpp +++ b/tests/test_ipc_wildcard.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_issue_566.cpp b/tests/test_issue_566.cpp index d8ff5d52..cecd9af3 100644 --- a/tests/test_issue_566.cpp +++ b/tests/test_issue_566.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_last_endpoint.cpp b/tests/test_last_endpoint.cpp index 7775704c..21a1d98c 100644 --- a/tests/test_last_endpoint.cpp +++ b/tests/test_last_endpoint.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_many_sockets.cpp b/tests/test_many_sockets.cpp index 19a5de64..d54d6cf7 100644 --- a/tests/test_many_sockets.cpp +++ b/tests/test_many_sockets.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_metadata.cpp b/tests/test_metadata.cpp index 6aff95ff..771a3c93 100644 --- a/tests/test_metadata.cpp +++ b/tests/test_metadata.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_monitor.cpp b/tests/test_monitor.cpp index e63686b1..8d19426a 100644 --- a/tests/test_monitor.cpp +++ b/tests/test_monitor.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_msg_flags.cpp b/tests/test_msg_flags.cpp index 1df8edb5..3cc95454 100644 --- a/tests/test_msg_flags.cpp +++ b/tests/test_msg_flags.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp index f191073c..4af5ce0d 100644 --- a/tests/test_pair_inproc.cpp +++ b/tests/test_pair_inproc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp index 76fb0988..560c754e 100644 --- a/tests/test_pair_ipc.cpp +++ b/tests/test_pair_ipc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index d7084d8b..58b629fb 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_pair_tipc.cpp b/tests/test_pair_tipc.cpp index 9cca6394..1b284add 100644 --- a/tests/test_pair_tipc.cpp +++ b/tests/test_pair_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_probe_router.cpp b/tests/test_probe_router.cpp index ff6938b7..ee4f463e 100644 --- a/tests/test_probe_router.cpp +++ b/tests/test_probe_router.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_proxy.cpp b/tests/test_proxy.cpp index e4aac782..425fb1e1 100644 --- a/tests/test_proxy.cpp +++ b/tests/test_proxy.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_proxy_terminate.cpp b/tests/test_proxy_terminate.cpp index 83e70d4b..9f688fb6 100644 --- a/tests/test_proxy_terminate.cpp +++ b/tests/test_proxy_terminate.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_pub_invert_matching.cpp b/tests/test_pub_invert_matching.cpp index a42efdf5..ef2cf093 100644 --- a/tests/test_pub_invert_matching.cpp +++ b/tests/test_pub_invert_matching.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_req_correlate.cpp b/tests/test_req_correlate.cpp index 298248fe..4200d1cc 100644 --- a/tests/test_req_correlate.cpp +++ b/tests/test_req_correlate.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_req_relaxed.cpp b/tests/test_req_relaxed.cpp index 7a5872a7..9262f6de 100644 --- a/tests/test_req_relaxed.cpp +++ b/tests/test_req_relaxed.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index 340116b8..e231c592 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_device_tipc.cpp b/tests/test_reqrep_device_tipc.cpp index ffc6ff9e..b617f8ac 100644 --- a/tests/test_reqrep_device_tipc.cpp +++ b/tests/test_reqrep_device_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 VMware, Inc. Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp index 65424ae1..6150fe05 100644 --- a/tests/test_reqrep_inproc.cpp +++ b/tests/test_reqrep_inproc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index 56c88bba..adf52585 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index e16f32fc..c1ac9661 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_reqrep_tipc.cpp b/tests/test_reqrep_tipc.cpp index fabe19f3..bd0e4116 100644 --- a/tests/test_reqrep_tipc.cpp +++ b/tests/test_reqrep_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_router_handover.cpp b/tests/test_router_handover.cpp index 2ae13b4b..07f76734 100644 --- a/tests/test_router_handover.cpp +++ b/tests/test_router_handover.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_router_mandatory.cpp b/tests/test_router_mandatory.cpp index de493476..c04d6ef9 100644 --- a/tests/test_router_mandatory.cpp +++ b/tests/test_router_mandatory.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_router_mandatory_hwm.cpp b/tests/test_router_mandatory_hwm.cpp index bdc3e551..7c808410 100644 --- a/tests/test_router_mandatory_hwm.cpp +++ b/tests/test_router_mandatory_hwm.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_router_mandatory_tipc.cpp b/tests/test_router_mandatory_tipc.cpp index 0e972bbe..ca961790 100644 --- a/tests/test_router_mandatory_tipc.cpp +++ b/tests/test_router_mandatory_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index b8c7b2b0..5dfa16d2 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index d3b212a1..56e54d9a 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index 8bae0932..3977e789 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_server_drop_more.cpp b/tests/test_server_drop_more.cpp index 868dd456..03d6a37d 100644 --- a/tests/test_server_drop_more.cpp +++ b/tests/test_server_drop_more.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index 44d8bbb5..e4e1658b 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_shutdown_stress_tipc.cpp b/tests/test_shutdown_stress_tipc.cpp index 51a5b988..ac8e72b3 100644 --- a/tests/test_shutdown_stress_tipc.cpp +++ b/tests/test_shutdown_stress_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_spec_dealer.cpp b/tests/test_spec_dealer.cpp index c715fde0..475a4dcd 100644 --- a/tests/test_spec_dealer.cpp +++ b/tests/test_spec_dealer.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_spec_pushpull.cpp b/tests/test_spec_pushpull.cpp index 677fc59f..40d15a0c 100644 --- a/tests/test_spec_pushpull.cpp +++ b/tests/test_spec_pushpull.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_spec_rep.cpp b/tests/test_spec_rep.cpp index 05f1b4d7..8db053d3 100644 --- a/tests/test_spec_rep.cpp +++ b/tests/test_spec_rep.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_spec_req.cpp b/tests/test_spec_req.cpp index 8318bf3f..b63dbb03 100644 --- a/tests/test_spec_req.cpp +++ b/tests/test_spec_req.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_spec_router.cpp b/tests/test_spec_router.cpp index 127f6d36..e563f8f6 100644 --- a/tests/test_spec_router.cpp +++ b/tests/test_spec_router.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_srcfd.cpp b/tests/test_srcfd.cpp index f5c6b5ea..1638b384 100644 --- a/tests/test_srcfd.cpp +++ b/tests/test_srcfd.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_stream.cpp b/tests/test_stream.cpp index dad2f9a3..e6b2230a 100644 --- a/tests/test_stream.cpp +++ b/tests/test_stream.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_stream_disconnect.cpp b/tests/test_stream_disconnect.cpp index 7c221c46..7d354a00 100644 --- a/tests/test_stream_disconnect.cpp +++ b/tests/test_stream_disconnect.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_stream_empty.cpp b/tests/test_stream_empty.cpp index 5d2041ec..209c06bb 100644 --- a/tests/test_stream_empty.cpp +++ b/tests/test_stream_empty.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_stream_timeout.cpp b/tests/test_stream_timeout.cpp index 25757ff3..73d62e18 100644 --- a/tests/test_stream_timeout.cpp +++ b/tests/test_stream_timeout.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_sub_forward.cpp b/tests/test_sub_forward.cpp index aa0f856c..f02328de 100644 --- a/tests/test_sub_forward.cpp +++ b/tests/test_sub_forward.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_sub_forward_tipc.cpp b/tests/test_sub_forward_tipc.cpp index d8cb47e3..de2f7fb1 100644 --- a/tests/test_sub_forward_tipc.cpp +++ b/tests/test_sub_forward_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_system.cpp b/tests/test_system.cpp index c55de0ad..26b9af70 100644 --- a/tests/test_system.cpp +++ b/tests/test_system.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_term_endpoint.cpp b/tests/test_term_endpoint.cpp index 3153bc14..4d08080c 100644 --- a/tests/test_term_endpoint.cpp +++ b/tests/test_term_endpoint.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_term_endpoint_tipc.cpp b/tests/test_term_endpoint_tipc.cpp index c0241550..dc3b6d3f 100644 --- a/tests/test_term_endpoint_tipc.cpp +++ b/tests/test_term_endpoint_tipc.cpp @@ -3,17 +3,27 @@ Copyright (c) 2011 iMatix Corporation Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_thread_safe.cpp b/tests/test_thread_safe.cpp index dbc360af..2f8cb2f8 100644 --- a/tests/test_thread_safe.cpp +++ b/tests/test_thread_safe.cpp @@ -1,17 +1,27 @@ /*: Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index 95d36bdf..8e28b8f4 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_xpub_manual.cpp b/tests/test_xpub_manual.cpp index 2c6484c3..08e6a638 100644 --- a/tests/test_xpub_manual.cpp +++ b/tests/test_xpub_manual.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_xpub_nodrop.cpp b/tests/test_xpub_nodrop.cpp index c3450114..2de14390 100644 --- a/tests/test_xpub_nodrop.cpp +++ b/tests/test_xpub_nodrop.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/test_xpub_welcome_msg.cpp b/tests/test_xpub_welcome_msg.cpp index b0ed19e0..b6d19014 100644 --- a/tests/test_xpub_welcome_msg.cpp +++ b/tests/test_xpub_welcome_msg.cpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 1e46b9d1..e66d4706 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -1,17 +1,27 @@ /* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . diff --git a/tools/curve_keygen.cpp b/tools/curve_keygen.cpp index 5a84a05e..3bc2fe20 100644 --- a/tools/curve_keygen.cpp +++ b/tools/curve_keygen.cpp @@ -1,24 +1,27 @@ /* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file - This file is part of 0MQ. + This file is part of libzmq, the ZeroMQ core engine in C++. - This tool generates a CurveZMQ keypair, as two printable strings you can - use in configuration files or source code. The encoding uses Z85, which - is a base-85 format that is described in 0MQ RFC 32, and which has an - implementation in the z85_codec.h source used by this tool. The keypair - always works with the secret key held by one party and the public key - distributed (securely!) to peers wishing to connect to it. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . @@ -47,7 +50,7 @@ int main (void) puts ("\n== CURVE PUBLIC KEY =="); puts (public_key); - + puts ("\n== CURVE SECRET KEY =="); puts (secret_key); From 3e330d6e2b9457c2ec8cc1aad420af435b91f089 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Tue, 2 Jun 2015 23:44:12 +0200 Subject: [PATCH 030/108] Fixes to README --- README.md | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 89df7d2b..3871aac7 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ ## Welcome -The 0MQ lightweight messaging kernel is a library which extends the +The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by -specialised messaging middleware products. 0MQ sockets provide an +specialised messaging middleware products. ZeroMQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. @@ -19,7 +19,7 @@ See the INSTALL file included with the distribution. ## Resources Extensive documentation is provided with the distribution. Refer to -doc/zmq.html, or "man zmq" after you have installed 0MQ on your system. +doc/zmq.html, or "man zmq" after you have installed libzmq on your system. Website: http://www.zeromq.org/ @@ -28,11 +28,29 @@ Announcements mailing list: zeromq-announce@lists.zeromq.org Git repository: http://github.com/zeromq/libzmq -0MQ developers can also be found on the IRC channel #zeromq, on the +ZeroMQ developers can also be found on the IRC channel #zeromq, on the Freenode network (irc.freenode.net). -## Copying +## License -Free use of this software is granted under the terms of the GNU Lesser General -Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER` -included with the 0MQ distribution. +The project license is specified in COPYING and COPYING.LESSER. + +libzmq is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License (LGPL) as published +by the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +As a special exception, the Contributors give you permission to link +this library with independent modules to produce an executable, +regardless of the license terms of these independent modules, and to +copy and distribute the resulting executable under terms of your choice, +provided that you also meet, for each linked independent module, the +terms and conditions of the license of that module. An independent +module is a module which is not derived from or based on this library. +If you modify this library, you must extend this exception to your +version of the library. + +libzmq is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. From 611e96c70135d4bc519c23028b9d4b170fd5f2c6 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Fri, 29 May 2015 23:47:03 +0200 Subject: [PATCH 031/108] Allocation-free msg::init_data With a msg_t size of 64 bytes, it becomes possible to embedd the content_t's members struct for large messages directly in the msg_t. This saves the dynamic allocation of content_t obejcts when using msg_t::init_data. content_t contains a zmq::atomic_counter_t object which is not a POD in C++98 and thus it cannot be used as a member of the union u. To bypass this, C++11 is used which has relaxed rules for POD and atomic_counter is a C++11-POD. An alternative would have been to make atomic_counter a classical POD by removing constructors and all private member functions, i.e. have a struct and free functions to manipulate it. A new msg_t::init function is added which decides to either to copy the data for size<64 bytes or use msg_t::init_data to do zero-copy initialization. --- src/msg.cpp | 99 +++++++++++++++++++++++++++++++++-------------------- src/msg.hpp | 50 ++++++++++++++++----------- 2 files changed, 91 insertions(+), 58 deletions(-) diff --git a/src/msg.cpp b/src/msg.cpp index a134a5b0..bed4cce8 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -45,11 +45,30 @@ typedef char zmq_msg_size_check [2 * ((sizeof (zmq::msg_t) == sizeof (zmq_msg_t)) != 0) - 1]; +// check whether the size of atomic_counter_t matches the size of the wrapped integer +// to ensure that the lsmg union is correctly aligned +typedef char zmq_msg_size_check + [2 * ((sizeof (zmq::atomic_counter_t) == sizeof (zmq::atomic_counter_t::integer_t)) != 0) - 1]; + bool zmq::msg_t::check () { return u.base.type >= type_min && u.base.type <= type_max; } +int zmq::msg_t::init (void *data_, size_t size_, msg_free_fn *ffn_, void *hint_) +{ + if (size_ <= max_vsm_size) + { + int rc = init_size(size_); + memcpy(data(), data_, size_); + return rc; + } + else + { + return init_data(data_, size_, ffn_, hint_); + } +} + int zmq::msg_t::init () { u.vsm.metadata = NULL; @@ -76,18 +95,16 @@ int zmq::msg_t::init_size (size_t size_) u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.routing_id = 0; - u.lmsg.content = - (content_t*) malloc (sizeof (content_t) + size_); - if (unlikely (!u.lmsg.content)) { + u.lmsg.data = malloc(size_); + if (unlikely (!u.lmsg.data)) { errno = ENOMEM; return -1; } - u.lmsg.content->data = u.lmsg.content + 1; - u.lmsg.content->size = size_; - u.lmsg.content->ffn = NULL; - u.lmsg.content->hint = NULL; - new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); + u.lmsg.size = size_; + u.lmsg.ffn = NULL; + u.lmsg.hint = NULL; + new (&u.lmsg.refcnt.counter) zmq::atomic_counter_t (); } return 0; } @@ -115,17 +132,12 @@ int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_, u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.routing_id = 0; - u.lmsg.content = (content_t*) malloc (sizeof (content_t)); - if (!u.lmsg.content) { - errno = ENOMEM; - return -1; - } - u.lmsg.content->data = data_; - u.lmsg.content->size = size_; - u.lmsg.content->ffn = ffn_; - u.lmsg.content->hint = hint_; - new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); + u.lmsg.data = data_; + u.lmsg.size = size_; + u.lmsg.ffn = ffn_; + u.lmsg.hint = hint_; + new (&u.lmsg.refcnt.counter) zmq::atomic_counter_t (); } return 0; @@ -140,6 +152,13 @@ int zmq::msg_t::init_delimiter () return 0; } +zmq::atomic_counter_t& zmq::msg_t::msg_counter() +{ + zmq_assert( is_lmsg() ); + void* ptr = static_cast( &u.lmsg.refcnt.counter ); + return *static_cast( ptr ); +} + int zmq::msg_t::close () { // Check the validity of the message. @@ -153,16 +172,14 @@ int zmq::msg_t::close () // If the content is not shared, or if it is shared and the reference // count has dropped to zero, deallocate it. if (!(u.lmsg.flags & msg_t::shared) || - !u.lmsg.content->refcnt.sub (1)) { + !msg_counter().sub (1)) { - // We used "placement new" operator to initialize the reference - // counter so we call the destructor explicitly now. - u.lmsg.content->refcnt.~atomic_counter_t (); - - if (u.lmsg.content->ffn) - u.lmsg.content->ffn (u.lmsg.content->data, - u.lmsg.content->hint); - free (u.lmsg.content); + if (u.lmsg.ffn) { + u.lmsg.ffn(u.lmsg.data, u.lmsg.hint); + } + else { + free (u.lmsg.data); + } } } @@ -214,10 +231,10 @@ int zmq::msg_t::copy (msg_t &src_) // One reference is added to shared messages. Non-shared messages // are turned into shared messages and reference count is set to 2. if (src_.u.lmsg.flags & msg_t::shared) - src_.u.lmsg.content->refcnt.add (1); + src_.msg_counter().add (1); else { src_.u.lmsg.flags |= msg_t::shared; - src_.u.lmsg.content->refcnt.set (2); + src_.msg_counter().set (2); } } @@ -239,7 +256,7 @@ void *zmq::msg_t::data () case type_vsm: return u.vsm.data; case type_lmsg: - return u.lmsg.content->data; + return u.lmsg.data; case type_cmsg: return u.cmsg.data; default: @@ -257,7 +274,7 @@ size_t zmq::msg_t::size () case type_vsm: return u.vsm.size; case type_lmsg: - return u.lmsg.content->size; + return u.lmsg.size; case type_cmsg: return u.cmsg.size; default: @@ -333,6 +350,11 @@ bool zmq::msg_t::is_vsm () return u.base.type == type_vsm; } +bool zmq::msg_t::is_lmsg () const +{ + return u.base.type == type_lmsg; +} + bool zmq::msg_t::is_cmsg () { return u.base.type == type_cmsg; @@ -353,9 +375,9 @@ void zmq::msg_t::add_refs (int refs_) // message type that needs special care are long messages. if (u.base.type == type_lmsg) { if (u.lmsg.flags & msg_t::shared) - u.lmsg.content->refcnt.add (refs_); + msg_counter().add (refs_); else { - u.lmsg.content->refcnt.set (refs_ + 1); + msg_counter().set (refs_ + 1); u.lmsg.flags |= msg_t::shared; } } @@ -379,14 +401,14 @@ bool zmq::msg_t::rm_refs (int refs_) } // The only message type that needs special care are long messages. - if (!u.lmsg.content->refcnt.sub (refs_)) { + if (!msg_counter().sub (refs_)) { // We used "placement new" operator to initialize the reference // counter so we call the destructor explicitly now. - u.lmsg.content->refcnt.~atomic_counter_t (); + msg_counter().~atomic_counter_t (); - if (u.lmsg.content->ffn) - u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint); - free (u.lmsg.content); + if (u.lmsg.ffn) + u.lmsg.ffn (u.lmsg.data, u.lmsg.hint); + free (u.lmsg.data); return false; } @@ -404,3 +426,4 @@ int zmq::msg_t::set_routing_id(uint32_t routing_id_) u.base.routing_id = routing_id_; return 0; } + diff --git a/src/msg.hpp b/src/msg.hpp index 647c1a20..6170a23a 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -54,7 +54,6 @@ namespace zmq class msg_t { public: - // Message flags. enum { @@ -66,6 +65,8 @@ namespace zmq }; bool check (); + int init (void *data_, size_t size_, msg_free_fn *ffn_, + void *hint_); int init (); int init_size (size_t size_); int init_data (void *data_, size_t size_, msg_free_fn *ffn_, @@ -88,6 +89,7 @@ namespace zmq bool is_credential () const; bool is_delimiter () const; bool is_vsm (); + bool is_lmsg () const; bool is_cmsg (); uint32_t get_routing_id(); int set_routing_id(uint32_t routing_id_); @@ -107,22 +109,6 @@ namespace zmq enum { msg_t_size = 64 }; enum { max_vsm_size = msg_t_size - (8 + sizeof (metadata_t *) + 3 + sizeof(uint32_t)) }; - // Shared message buffer. Message data are either allocated in one - // continuous block along with this structure - thus avoiding one - // malloc/free pair or they are stored in used-supplied memory. - // In the latter case, ffn member stores pointer to the function to be - // used to deallocate the data. If the buffer is actually shared (there - // are at least 2 references to it) refcount member contains number of - // references. - struct content_t - { - void *data; - size_t size; - msg_free_fn *ffn; - void *hint; - zmq::atomic_counter_t refcnt; - }; - // Different message types. enum type_t { @@ -138,6 +124,8 @@ namespace zmq type_max = 104 }; + atomic_counter_t& msg_counter(); + // the file descriptor where this message originated, needs to be 64bit due to alignment int64_t file_desc; @@ -161,10 +149,32 @@ namespace zmq unsigned char flags; uint32_t routing_id; } vsm; - struct { + struct lmsg_t { metadata_t *metadata; - content_t *content; - unsigned char unused [msg_t_size - (8 + sizeof (metadata_t *) + sizeof (content_t*) + 2 + sizeof(uint32_t))]; + // Shared message buffer. Message data are either allocated in one + // continuous block along with this structure - thus avoiding one + // malloc/free pair or they are stored in used-supplied memory. + // In the latter case, ffn member stores pointer to the function to be + // used to deallocate the data. If the buffer is actually shared (there + // are at least 2 references to it) refcount member contains number of + // references. + void *data; + size_t size; + msg_free_fn *ffn; + void *hint; + // create an aligned block for an atomic_counter_t object + union aligned_atomic_counter_storage { + zmq::atomic_counter_t::integer_t maxAlign; + unsigned char counter[ sizeof(zmq::atomic_counter_t) ]; + } refcnt; + unsigned char unused [msg_t_size - (8 + sizeof (metadata_t *) + + sizeof(void*) + + sizeof(size_t) + + sizeof(msg_free_fn*) + + sizeof(void*) + + sizeof(aligned_atomic_counter_storage) + + 2 + + sizeof(uint32_t))]; unsigned char type; unsigned char flags; uint32_t routing_id; From e9b403a7b10315428b05479dad76a3b7270bcd25 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Fri, 29 May 2015 23:54:43 +0200 Subject: [PATCH 032/108] zero-copy message receive Construct messages from a reference-counted buffer allocated once per receive instead of copying the data. --- src/atomic_counter.hpp | 2 +- src/decoder.hpp | 84 ++++++++++++++++----- src/v1_decoder.cpp | 11 +-- src/v1_decoder.hpp | 12 +-- src/v2_decoder.cpp | 162 +++++++++++++++++++++++++++++++++-------- src/v2_decoder.hpp | 69 ++++++++++++++++-- 6 files changed, 273 insertions(+), 67 deletions(-) diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index 01d7d195..bceb8347 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -183,7 +183,7 @@ namespace zmq #endif } - inline integer_t get () + inline integer_t get () const { return value; } diff --git a/src/decoder.hpp b/src/decoder.hpp index fc4b177d..5458992b 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -42,6 +42,45 @@ namespace zmq { + // Static buffer policy. + class c_single_allocator + { + public: + c_single_allocator(size_t bufsize_): + buf((unsigned char*) malloc (bufsize) ), + bufsize(bufsize_) + { + alloc_assert (buf); + } + + ~c_single_allocator() + { + free(buf); + } + + unsigned char* allocate() + { + return buf; + } + + void deallocate() + { + + } + + size_t size() const + { + return bufsize; + } + + private: + unsigned char* buf; + size_t bufsize; + + c_single_allocator( c_single_allocator const& ); + c_single_allocator& operator=(c_single_allocator const&); + }; + // Helper base class for decoders that know the amount of data to read // in advance at any moment. Knowing the amount in advance is a property // of the protocol used. 0MQ framing protocol is based size-prefixed @@ -52,31 +91,34 @@ namespace zmq // // This class implements the state machine that parses the incoming buffer. // Derived class should implement individual state machine actions. - - template class decoder_base_t : public i_decoder + // + // Buffer managment is done by an allocator policy. + template + class decoder_base_t : public i_decoder { public: - inline decoder_base_t (size_t bufsize_) : - next (NULL), - read_pos (NULL), - to_read (0), - bufsize (bufsize_) + inline decoder_base_t (A* allocator_) : + next (NULL), + read_pos (NULL), + to_read (0), + allocator( allocator_ ) { - buf = (unsigned char*) malloc (bufsize_); - alloc_assert (buf); + buf = allocator->allocate(); } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~decoder_base_t () { - free (buf); + allocator->deallocate(); } // Returns a buffer to be filled with binary data. inline void get_buffer (unsigned char **data_, size_t *size_) { + buf = allocator->allocate(); + // If we are expected to read large message, we'll opt for zero- // copy, i.e. we'll ask caller to fill the data directly to the // message. Note that subsequent read(s) are non-blocking, thus @@ -85,14 +127,14 @@ namespace zmq // As a consequence, large messages being received won't block // other engines running in the same I/O thread for excessive // amounts of time. - if (to_read >= bufsize) { + if (to_read >= allocator->size()) { *data_ = read_pos; *size_ = to_read; return; } *data_ = buf; - *size_ = bufsize; + *size_ = allocator->size(); } // Processes the data in the buffer previously allocated using @@ -116,7 +158,7 @@ namespace zmq bytes_used_ = size_; while (!to_read) { - const int rc = (static_cast (this)->*next) (); + const int rc = (static_cast (this)->*next) (data_ + bytes_used_); if (rc != 0) return rc; } @@ -126,14 +168,20 @@ namespace zmq while (bytes_used_ < size_) { // Copy the data from buffer to the message. const size_t to_copy = std::min (to_read, size_ - bytes_used_); - memcpy (read_pos, data_ + bytes_used_, to_copy); + // only copy when the destination address is different from the + // current address in the buffer + if (read_pos != data_ + bytes_used_) { + memcpy(read_pos, data_ + bytes_used_, to_copy); + } + read_pos += to_copy; to_read -= to_copy; bytes_used_ += to_copy; // Try to get more space in the message to fill in. // If none is available, return. while (to_read == 0) { - const int rc = (static_cast (this)->*next) (); + // pass current address in the buffer + const int rc = (static_cast (this)->*next) (data_ + bytes_used_); if (rc != 0) return rc; } @@ -146,7 +194,7 @@ namespace zmq // Prototype of state machine action. Action should return false if // it is unable to push the data to the system. - typedef int (T::*step_t) (); + typedef int (T::*step_t) (unsigned char const*); // This function should be called from derived class to read data // from the buffer and schedule next state machine action. @@ -171,8 +219,8 @@ namespace zmq size_t to_read; // The duffer for data to decode. - size_t bufsize; - unsigned char *buf; + A* allocator; + unsigned char* buf; decoder_base_t (const decoder_base_t&); const decoder_base_t &operator = (const decoder_base_t&); diff --git a/src/v1_decoder.cpp b/src/v1_decoder.cpp index a21bb2f5..508f3210 100644 --- a/src/v1_decoder.cpp +++ b/src/v1_decoder.cpp @@ -43,7 +43,8 @@ #include "err.hpp" zmq::v1_decoder_t::v1_decoder_t (size_t bufsize_, int64_t maxmsgsize_) : - decoder_base_t (bufsize_), + c_single_allocator(bufsize_), + decoder_base_t (this), maxmsgsize (maxmsgsize_) { int rc = in_progress.init (); @@ -59,7 +60,7 @@ zmq::v1_decoder_t::~v1_decoder_t () errno_assert (rc == 0); } -int zmq::v1_decoder_t::one_byte_size_ready () +int zmq::v1_decoder_t::one_byte_size_ready (unsigned char const*) { // First byte of size is read. If it is 0xff read 8-byte size. // Otherwise allocate the buffer for message data and read the @@ -96,7 +97,7 @@ int zmq::v1_decoder_t::one_byte_size_ready () return 0; } -int zmq::v1_decoder_t::eight_byte_size_ready () +int zmq::v1_decoder_t::eight_byte_size_ready (unsigned char const*) { // 8-byte payload length is read. Allocate the buffer // for message body and read the message data into it. @@ -138,7 +139,7 @@ int zmq::v1_decoder_t::eight_byte_size_ready () return 0; } -int zmq::v1_decoder_t::flags_ready () +int zmq::v1_decoder_t::flags_ready (unsigned char const*) { // Store the flags from the wire into the message structure. in_progress.set_flags (tmpbuf [0] & msg_t::more); @@ -149,7 +150,7 @@ int zmq::v1_decoder_t::flags_ready () return 0; } -int zmq::v1_decoder_t::message_ready () +int zmq::v1_decoder_t::message_ready (unsigned char const*) { // Message is completely read. Push it further and start reading // new message. (in_progress is a 0-byte message after this point.) diff --git a/src/v1_decoder.hpp b/src/v1_decoder.hpp index 69207236..e1abdae2 100644 --- a/src/v1_decoder.hpp +++ b/src/v1_decoder.hpp @@ -36,7 +36,9 @@ namespace zmq { // Decoder for ZMTP/1.0 protocol. Converts data batches into messages. - class v1_decoder_t : public decoder_base_t + class v1_decoder_t : + public zmq::c_single_allocator, + public decoder_base_t { public: @@ -47,10 +49,10 @@ namespace zmq private: - int one_byte_size_ready (); - int eight_byte_size_ready (); - int flags_ready (); - int message_ready (); + int one_byte_size_ready (unsigned char const*); + int eight_byte_size_ready (unsigned char const*); + int flags_ready (unsigned char const*); + int message_ready (unsigned char const*); unsigned char tmpbuf [8]; msg_t in_progress; diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 394b1e9f..9eb8d12f 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -41,8 +41,96 @@ #include "wire.hpp" #include "err.hpp" +zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): + buf(NULL), + bufsize( bufsize_ ) +{ + +} + +zmq::shared_message_memory_allocator::~shared_message_memory_allocator() +{ + deallocate(); +} + +unsigned char* zmq::shared_message_memory_allocator::allocate() +{ + if (buf) + { + // release reference count to couple lifetime to messages + call_dec_ref(NULL, buf); + // release pointer because we are going to create a new buffer + release(); + } + + // @todo aligmnet padding may be needed + if (!buf) + { + buf = (unsigned char *) malloc(bufsize + sizeof(zmq::atomic_counter_t)); + alloc_assert (buf); + new(buf) atomic_counter_t(1); + } + + return buf + sizeof( zmq::atomic_counter_t); +} + +void zmq::shared_message_memory_allocator::deallocate() +{ + free(buf); + buf = NULL; +} + +unsigned char* zmq::shared_message_memory_allocator::release() +{ + unsigned char* b = buf; + buf = NULL; + return b; +} + +void zmq::shared_message_memory_allocator::reset(unsigned char* b) +{ + deallocate(); + buf = b; +} + +void zmq::shared_message_memory_allocator::inc_ref() +{ + ((zmq::atomic_counter_t*)buf)->add(1); +} + +void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { + zmq_assert( hint ); + zmq::atomic_counter_t *c = reinterpret_cast(hint); + + if (!c->sub(1)) { + c->~atomic_counter_t(); + free(hint); + } +} + + +size_t zmq::shared_message_memory_allocator::size() const +{ + if (buf) + { + return bufsize; + } + else + { + return 0; + } +} + +unsigned char* zmq::shared_message_memory_allocator::data() +{ + zmq_assert(buf); + + return buf + sizeof(zmq::atomic_counter_t); +} + zmq::v2_decoder_t::v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_) : - decoder_base_t (bufsize_), + shared_message_memory_allocator( bufsize_), + decoder_base_t (this), msg_flags (0), maxmsgsize (maxmsgsize_) { @@ -59,7 +147,7 @@ zmq::v2_decoder_t::~v2_decoder_t () errno_assert (rc == 0); } -int zmq::v2_decoder_t::flags_ready () +int zmq::v2_decoder_t::flags_ready (unsigned char const*) { msg_flags = 0; if (tmpbuf [0] & v2_protocol_t::more_flag) @@ -77,40 +165,20 @@ int zmq::v2_decoder_t::flags_ready () return 0; } -int zmq::v2_decoder_t::one_byte_size_ready () +int zmq::v2_decoder_t::one_byte_size_ready (unsigned char const* read_from) { - // Message size must not exceed the maximum allowed size. - if (maxmsgsize >= 0) - if (unlikely (tmpbuf [0] > static_cast (maxmsgsize))) { - errno = EMSGSIZE; - return -1; - } - - // in_progress is initialised at this point so in theory we should - // close it before calling zmq_msg_init_size, however, it's a 0-byte - // message and thus we can treat it as uninitialised... - int rc = in_progress.init_size (tmpbuf [0]); - if (unlikely (rc)) { - errno_assert (errno == ENOMEM); - rc = in_progress.init (); - errno_assert (rc == 0); - errno = ENOMEM; - return -1; - } - - in_progress.set_flags (msg_flags); - next_step (in_progress.data (), in_progress.size (), - &v2_decoder_t::message_ready); - - return 0; + return size_ready(tmpbuf[0], read_from); } -int zmq::v2_decoder_t::eight_byte_size_ready () -{ +int zmq::v2_decoder_t::eight_byte_size_ready (unsigned char const* read_from) { // The payload size is encoded as 64-bit unsigned integer. // The most significant byte comes first. - const uint64_t msg_size = get_uint64 (tmpbuf); + const uint64_t msg_size = get_uint64(tmpbuf); + return size_ready(msg_size, read_from); +} + +int zmq::v2_decoder_t::size_ready(uint64_t msg_size, unsigned char const* read_pos) { // Message size must not exceed the maximum allowed size. if (maxmsgsize >= 0) if (unlikely (msg_size > static_cast (maxmsgsize))) { @@ -127,7 +195,31 @@ int zmq::v2_decoder_t::eight_byte_size_ready () // in_progress is initialised at this point so in theory we should // close it before calling init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised. - int rc = in_progress.init_size (static_cast (msg_size)); + int rc = -1; + + // the current message can exceed the current buffer. We have to copy the buffer + // data into a new message and complete it in the next receive. + if (unlikely ((unsigned char*)read_pos + msg_size > (data() + size()))) + { + // a new message has started, but the size would exceed the pre-allocated arena + // this happens everytime when a message does not fit completely into the buffer + rc = in_progress.init_size (static_cast (msg_size)); + } + else + { + // construct message using n bytes from the buffer as storage + // increase buffer ref count + rc = in_progress.init( (unsigned char*)read_pos, + msg_size, shared_message_memory_allocator::call_dec_ref, + buffer() ); + + // For small messages, data has been copied and refcount does not have to be increased + if (in_progress.is_lmsg()) + { + inc_ref(); + } + } + if (unlikely (rc)) { errno_assert (errno == ENOMEM); rc = in_progress.init (); @@ -137,13 +229,19 @@ int zmq::v2_decoder_t::eight_byte_size_ready () } in_progress.set_flags (msg_flags); + // this sets read_pos to + // the message data address if the data needs to be copied + // for small message / messages exceeding the current buffer + // or + // to the current start address in the buffer because the message + // was constructed to use n bytes from the address passed as argument next_step (in_progress.data (), in_progress.size (), &v2_decoder_t::message_ready); return 0; } -int zmq::v2_decoder_t::message_ready () +int zmq::v2_decoder_t::message_ready (unsigned char const*) { // Message is completely read. Signal this to the caller // and prepare to decode next message. diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index 14c48e4e..642b4b78 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -34,11 +34,66 @@ namespace zmq { - // Decoder for ZMTP/2.x framing protocol. Converts data stream into messages. - class v2_decoder_t : public decoder_base_t + // This allocater allocates a reference counted buffer which is used by v2_decoder_t + // to use zero-copy msg::init_data to create messages with memory from this buffer as + // data storage. + // + // The buffer is allocated with a reference count of 1 to make sure that is is alive while + // decoding messages. Otherwise, it is possible that e.g. the first message increases the count + // from zero to one, gets passed to the user application, processed in the user thread and deleted + // which would then deallocate the buffer. The drawback is that the buffer may be allocated longer + // than necessary because it is only deleted when allocate is called the next time. + class shared_message_memory_allocator { public: + shared_message_memory_allocator(size_t bufsize_); + ~shared_message_memory_allocator(); + + // Allocate a new buffer + // + // This releases the current buffer to be bound to the lifetime of the messages + // created on this bufer. + unsigned char* allocate(); + + // force deallocation of buffer. + void deallocate(); + + // Give up ownership of the buffer. The buffer's lifetime is now coupled to + // the messages constructed on top of it. + unsigned char* release(); + + void reset(unsigned char* b); + + void inc_ref(); + + static void call_dec_ref(void*, void* buffer); + + size_t size() const; + + // Return pointer to the first message data byte. + unsigned char* data(); + + // Return pointer to the first byte of the buffer. + unsigned char* buffer() + { + return buf; + } + + private: + unsigned char* buf; + size_t bufsize; + }; + + // Decoder for ZMTP/2.x framing protocol. Converts data stream into messages. + // The class has to inherit from shared_message_memory_allocator because + // the base class calls allocate in its constructor. + class v2_decoder_t : + // inherit first from allocator to ensure that it is constructed before decoder_base_t + public shared_message_memory_allocator, + public decoder_base_t + { + public: v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_); virtual ~v2_decoder_t (); @@ -47,10 +102,12 @@ namespace zmq private: - int flags_ready (); - int one_byte_size_ready (); - int eight_byte_size_ready (); - int message_ready (); + int flags_ready (unsigned char const*); + int one_byte_size_ready (unsigned char const*); + int eight_byte_size_ready (unsigned char const*); + int message_ready (unsigned char const*); + + int size_ready(uint64_t size_, unsigned char const*); unsigned char tmpbuf [8]; unsigned char msg_flags; From fb960147ca5673ecda34cdb87d963ffd022189b4 Mon Sep 17 00:00:00 2001 From: Kapp Arnaud Date: Thu, 4 Jun 2015 01:38:45 +0200 Subject: [PATCH 033/108] Introduce a failing test against zmq_setsockpt(). Problem: zmq_setsockpt() returns success when changing the HWM after a bind or connect() even though the call has no effect. Solution: Introduce a failing test a reminder we need to patch it. --- Makefile.am | 6 ++++- tests/CMakeLists.txt | 1 + tests/test_sockopt_hwm.cpp | 52 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 tests/test_sockopt_hwm.cpp diff --git a/Makefile.am b/Makefile.am index 3efd488c..e58511d6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -355,7 +355,8 @@ test_apps = \ tests/test_client_server \ tests/test_server_drop_more \ tests/test_client_drop_more \ - tests/test_thread_safe + tests/test_thread_safe \ + tests/test_socketopt_hwm tests_test_system_SOURCES = tests/test_system.cpp tests_test_system_LDADD = src/libzmq.la @@ -542,6 +543,9 @@ tests_test_client_drop_more_LDADD = src/libzmq.la tests_test_thread_safe_SOURCES = tests/test_thread_safe.cpp tests_test_thread_safe_LDADD = src/libzmq.la +tests_test_socketopt_hwm_SOURCES = tests/test_sockopt_hwm.cpp +tests_test_socketopt_hwm_LDADD = src/libzmq.la + if !ON_MINGW diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3daa8164..b166e6d3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -47,6 +47,7 @@ set(tests test_pub_invert_matching test_thread_safe test_client_server + test_sockopt_hwm ) if(NOT WIN32) list(APPEND tests diff --git a/tests/test_sockopt_hwm.cpp b/tests/test_sockopt_hwm.cpp new file mode 100644 index 00000000..ef81daf4 --- /dev/null +++ b/tests/test_sockopt_hwm.cpp @@ -0,0 +1,52 @@ +#include "testutil.hpp" + +void test_valid_hwm_change() +{ + void *ctx = zmq_ctx_new (); + assert (ctx); + int rc; + + void *bind_socket = zmq_socket (ctx, ZMQ_SUB); + assert (bind_socket); + + int val = 500; + rc = zmq_setsockopt(bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert (rc == 0); + + rc = zmq_bind (bind_socket, "inproc://a"); + assert (rc == 0); + + size_t placeholder = sizeof(val); + val = 0; + rc = zmq_getsockopt(bind_socket, ZMQ_RCVHWM, &val, &placeholder); + assert (rc == 0); + assert(val == 500); +} + + +/** + * Test that zmq_setsockopt() fails to change the RCVHWM when called + * after a call to zmq_bind(). + */ +void test_invalid_hwm_change() +{ + void *ctx = zmq_ctx_new (); + assert (ctx); + int rc; + + void *bind_socket = zmq_socket (ctx, ZMQ_SUB); + assert (bind_socket); + + rc = zmq_bind (bind_socket, "inproc://a"); + assert (rc == 0); + + int val = 500; + rc = zmq_setsockopt(bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert (rc == -1); +} + +int main() +{ + test_valid_hwm_change(); + test_invalid_hwm_change(); +} From e37d71570203bc7d59194c52e48bf441ac7979a2 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Thu, 4 Jun 2015 23:57:50 +0200 Subject: [PATCH 034/108] Problem: tests/test_socketopt_hwm fails and breaks CI Solution: mark this as XFAIL --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index e58511d6..203f67d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -635,7 +635,7 @@ check_PROGRAMS = ${test_apps} # Run the test cases TESTS = $(test_apps) -XFAIL_TESTS = +XFAIL_TESTS = tests/test_socketopt_hwm if !ON_LINUX XFAIL_TESTS += tests/test_abstract_ipc From 9f8b8af92633c2b5ed0fd7b6cfe5bdb9fafd69b8 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Fri, 5 Jun 2015 10:43:40 +0100 Subject: [PATCH 035/108] Fail ZMQ_SNDHWM and ZMQ_RCVHWM setsockopt if already connected. --- Makefile.am | 2 +- src/options.cpp | 23 +++++++++++++++++++++-- src/options.hpp | 5 ++++- src/socket_base.cpp | 17 ++++++++++++++++- tests/test_sockopt_hwm.cpp | 31 ++++++++++++++++++++++++++++--- 5 files changed, 70 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 203f67d1..e58511d6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -635,7 +635,7 @@ check_PROGRAMS = ${test_apps} # Run the test cases TESTS = $(test_apps) -XFAIL_TESTS = tests/test_socketopt_hwm +XFAIL_TESTS = if !ON_LINUX XFAIL_TESTS += tests/test_abstract_ipc diff --git a/src/options.cpp b/src/options.cpp index 0806bf77..9cc435bd 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -68,7 +68,8 @@ zmq::options_t::options_t () : gss_plaintext (false), socket_id (0), conflate (false), - handshake_ivl (30000) + handshake_ivl (30000), + connected (false) { } @@ -539,7 +540,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, return -1; } -int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) +int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) const { bool is_int = (*optvallen_ == sizeof (int)); int *value = (int *) optval_; @@ -884,3 +885,21 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) errno = EINVAL; return -1; } + +bool zmq::options_t::is_valid (int option_) const +{ + bool valid = true; + + if (connected) { + switch (option_) { + case ZMQ_SNDHWM: + case ZMQ_RCVHWM: + valid = false; + break; + default: + break; + } + } + + return valid; +} diff --git a/src/options.hpp b/src/options.hpp index 0517f341..cb83616f 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -55,7 +55,9 @@ namespace zmq options_t (); int setsockopt (int option_, const void *optval_, size_t optvallen_); - int getsockopt (int option_, void *optval_, size_t *optvallen_); + int getsockopt (int option_, void *optval_, size_t *optvallen_) const; + + bool is_valid (int option_) const; // High-water marks for message pipes. int sndhwm; @@ -195,6 +197,7 @@ namespace zmq // close socket. Default is 30 secs. 0 means no handshake timeout. int handshake_ivl; + bool connected; }; } diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 47f7c8b5..36dac739 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -312,6 +312,13 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, { ENTER_MUTEX(); + if (!options.is_valid(option_)) { + errno = EINVAL; + EXIT_MUTEX(); + return -1; + } + + if (unlikely (ctx_terminated)) { errno = ETERM; EXIT_MUTEX(); @@ -447,6 +454,7 @@ int zmq::socket_base_t::bind (const char *addr_) if (rc == 0) { connect_pending (addr_, this); last_endpoint.assign (addr_); + options.connected = true; } EXIT_MUTEX(); return rc; @@ -456,7 +464,10 @@ int zmq::socket_base_t::bind (const char *addr_) // For convenience's sake, bind can be used interchageable with // connect for PGM, EPGM and NORM transports. EXIT_MUTEX(); - return connect (addr_); + rc = connect (addr_); + if (rc != -1) + options.connected = true; + return rc; } // Remaining trasnports require to be run in an I/O thread, so at this @@ -484,6 +495,7 @@ int zmq::socket_base_t::bind (const char *addr_) listener->get_address (last_endpoint); add_endpoint (last_endpoint.c_str (), (own_t *) listener, NULL); + options.connected = true; EXIT_MUTEX(); return 0; } @@ -505,6 +517,7 @@ int zmq::socket_base_t::bind (const char *addr_) listener->get_address (last_endpoint); add_endpoint (last_endpoint.c_str (), (own_t *) listener, NULL); + options.connected = true; EXIT_MUTEX(); return 0; } @@ -526,6 +539,7 @@ int zmq::socket_base_t::bind (const char *addr_) listener->get_address (last_endpoint); add_endpoint (addr_, (own_t *) listener, NULL); + options.connected = true; EXIT_MUTEX(); return 0; } @@ -657,6 +671,7 @@ int zmq::socket_base_t::connect (const char *addr_) // remember inproc connections for disconnect inprocs.insert (inprocs_t::value_type (std::string (addr_), new_pipes [0])); + options.connected = true; EXIT_MUTEX(); return 0; } diff --git a/tests/test_sockopt_hwm.cpp b/tests/test_sockopt_hwm.cpp index ef81daf4..b4ab2af0 100644 --- a/tests/test_sockopt_hwm.cpp +++ b/tests/test_sockopt_hwm.cpp @@ -28,7 +28,7 @@ void test_valid_hwm_change() * Test that zmq_setsockopt() fails to change the RCVHWM when called * after a call to zmq_bind(). */ -void test_invalid_hwm_change() +void test_invalid_hwm_change_bind() { void *ctx = zmq_ctx_new (); assert (ctx); @@ -41,12 +41,37 @@ void test_invalid_hwm_change() assert (rc == 0); int val = 500; - rc = zmq_setsockopt(bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); + rc = zmq_setsockopt (bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); assert (rc == -1); + + zmq_close (bind_socket); + zmq_ctx_term (ctx); } +void test_invalid_hwm_change_connect() +{ + void *ctx = zmq_ctx_new(); + assert(ctx); + int rc; + + void *connect_socket = zmq_socket (ctx, ZMQ_SUB); + assert(connect_socket); + + rc = zmq_connect (connect_socket, "inproc://a"); + assert(rc == 0); + + int val = 500; + rc = zmq_setsockopt (connect_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert(rc == -1); + + zmq_close (connect_socket); + zmq_ctx_term (ctx); +} + + int main() { test_valid_hwm_change(); - test_invalid_hwm_change(); + test_invalid_hwm_change_bind(); + test_invalid_hwm_change_connect(); } From 32770d2e60829d2965fe3ca9d842fa4844d7e96e Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Fri, 5 Jun 2015 10:50:02 +0100 Subject: [PATCH 036/108] Remove accidentally committed appveyor file. --- appveyor.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index eb2fb68d..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,19 +0,0 @@ -environment: - matrix: - - configuration: Release -branches: - only: - - master - -clone_folder: c:\libzmq - -build_script: - - md c:\build - - cd c:\build - - echo Running cmake... - - cmake -G "Visual Studio 12" -DCMAKE_BUILD_TYPE=%Configuration% c:\libzmq - - cmake --build . - -test_script: - - cd c:\build - - ctest -C %Configuration% From dc105ffc78f87af5093f95d4c5fede78f1ae2566 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Fri, 5 Jun 2015 12:19:48 +0100 Subject: [PATCH 037/108] Fix xpub test to set hwm before bind. --- tests/test_xpub_nodrop.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_xpub_nodrop.cpp b/tests/test_xpub_nodrop.cpp index 2de14390..4d146413 100644 --- a/tests/test_xpub_nodrop.cpp +++ b/tests/test_xpub_nodrop.cpp @@ -38,7 +38,12 @@ int main (void) // Create a publisher void *pub = zmq_socket (ctx, ZMQ_PUB); assert (pub); - int rc = zmq_bind (pub, "inproc://soname"); + + int hwm = 2000; + int rc = zmq_setsockopt(pub, ZMQ_SNDHWM, &hwm, 4); + assert(rc == 0); + + rc = zmq_bind (pub, "inproc://soname"); assert (rc == 0); // set pub socket options @@ -46,9 +51,6 @@ int main (void) rc = zmq_setsockopt (pub, ZMQ_XPUB_NODROP, &wait, 4); assert (rc == 0); - int hwm = 2000; - rc = zmq_setsockopt (pub, ZMQ_SNDHWM, &hwm, 4); - assert (rc == 0); // Create a subscriber void *sub = zmq_socket (ctx, ZMQ_SUB); From b0296bc66f609fb36a415e0b36e90660eabb58ec Mon Sep 17 00:00:00 2001 From: Mipa Date: Fri, 5 Jun 2015 16:01:42 +0300 Subject: [PATCH 038/108] Fixed executable name in the usage string --- perf/inproc_thr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp index 5dcbabd7..08fb4bf3 100644 --- a/perf/inproc_thr.cpp +++ b/perf/inproc_thr.cpp @@ -125,7 +125,7 @@ int main (int argc, char *argv []) double megabits; if (argc != 3) { - printf ("usage: thread_thr \n"); + printf ("usage: inproc_thr \n"); return 1; } From 15eecf4cf4a96eb5e3935ce1d2bcb5a1be87eb22 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Fri, 5 Jun 2015 17:14:55 +0100 Subject: [PATCH 039/108] Update high water marking to allow changing high water mark after connection established. --- src/ctx.cpp | 23 +++-- src/options.cpp | 15 +--- src/pipe.cpp | 12 ++- src/pipe.hpp | 7 ++ src/socket_base.cpp | 18 ++++ src/socket_base.hpp | 2 + tests/test_sockopt_hwm.cpp | 168 ++++++++++++++++++++++++++----------- 7 files changed, 167 insertions(+), 78 deletions(-) diff --git a/src/ctx.cpp b/src/ctx.cpp index d61cc2f3..58b95600 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -529,15 +529,6 @@ void zmq::ctx_t::connect_inproc_sockets (zmq::socket_base_t *bind_socket_, errno_assert (rc == 0); } - - int sndhwm = 0; - if (pending_connection_.endpoint.options.sndhwm != 0 && bind_options.rcvhwm != 0) - sndhwm = pending_connection_.endpoint.options.sndhwm + bind_options.rcvhwm; - - int rcvhwm = 0; - if (pending_connection_.endpoint.options.rcvhwm != 0 && bind_options.sndhwm != 0) - rcvhwm = pending_connection_.endpoint.options.rcvhwm + bind_options.sndhwm; - bool conflate = pending_connection_.endpoint.options.conflate && (pending_connection_.endpoint.options.type == ZMQ_DEALER || pending_connection_.endpoint.options.type == ZMQ_PULL || @@ -545,9 +536,17 @@ void zmq::ctx_t::connect_inproc_sockets (zmq::socket_base_t *bind_socket_, pending_connection_.endpoint.options.type == ZMQ_PUB || pending_connection_.endpoint.options.type == ZMQ_SUB); - int hwms [2] = {conflate? -1 : sndhwm, conflate? -1 : rcvhwm}; - pending_connection_.connect_pipe->set_hwms(hwms [1], hwms [0]); - pending_connection_.bind_pipe->set_hwms(hwms [0], hwms [1]); + if (!conflate) { + pending_connection_.connect_pipe->set_hwms_boost(bind_options.sndhwm, bind_options.rcvhwm); + pending_connection_.bind_pipe->set_hwms_boost(pending_connection_.endpoint.options.sndhwm, pending_connection_.endpoint.options.rcvhwm); + + pending_connection_.connect_pipe->set_hwms(pending_connection_.endpoint.options.rcvhwm, pending_connection_.endpoint.options.sndhwm); + pending_connection_.bind_pipe->set_hwms(bind_options.rcvhwm, bind_options.sndhwm); + } + else { + pending_connection_.connect_pipe->set_hwms(-1, -1); + pending_connection_.bind_pipe->set_hwms(-1, -1); + } if (side_ == bind_side) { command_t cmd; diff --git a/src/options.cpp b/src/options.cpp index 9cc435bd..40116996 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -888,18 +888,5 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) bool zmq::options_t::is_valid (int option_) const { - bool valid = true; - - if (connected) { - switch (option_) { - case ZMQ_SNDHWM: - case ZMQ_RCVHWM: - valid = false; - break; - default: - break; - } - } - - return valid; + return true; } diff --git a/src/pipe.cpp b/src/pipe.cpp index 15742aac..60137f9a 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -81,6 +81,8 @@ zmq::pipe_t::pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, out_active (true), hwm (outhwm_), lwm (compute_lwm (inhwm_)), + inhwmboost(0), + outhwmboost(0), msgs_read (0), msgs_written (0), peers_msgs_read (0), @@ -518,8 +520,14 @@ void zmq::pipe_t::hiccup () void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { - lwm = compute_lwm (inhwm_); - hwm = outhwm_; + lwm = compute_lwm(inhwm_ + inhwmboost); + hwm = outhwm_ + outhwmboost; +} + +void zmq::pipe_t::set_hwms_boost(int inhwmboost_, int outhwmboost_) +{ + inhwmboost = inhwmboost_; + outhwmboost = outhwmboost_; } bool zmq::pipe_t::check_hwm () const diff --git a/src/pipe.hpp b/src/pipe.hpp index 43d42050..b795f641 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -133,6 +133,9 @@ namespace zmq // set the high water marks. void set_hwms (int inhwm_, int outhwm_); + // set the boost to high water marks, used by inproc sockets so total hwm are sum of connect and bind sockets watermarks + void set_hwms_boost(int inhwmboost_, int outhwmboost_); + // check HWM bool check_hwm () const; private: @@ -176,6 +179,10 @@ namespace zmq // Low watermark for the inbound pipe. int lwm; + // boosts for high and low watermarks, used with inproc sockets so hwm are sum of send and recv hmws on each side of pipe + int inhwmboost; + int outhwmboost; + // Number of messages read and written so far. uint64_t msgs_read; uint64_t msgs_written; diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 36dac739..bddbaf2f 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -335,6 +335,7 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, // If the socket type doesn't support the option, pass it to // the generic option parser. rc = options.setsockopt (option_, optval_, optvallen_); + update_pipe_options(option_); EXIT_MUTEX(); return rc; @@ -612,6 +613,11 @@ int zmq::socket_base_t::connect (const char *addr_) int hwms [2] = {conflate? -1 : sndhwm, conflate? -1 : rcvhwm}; bool conflates [2] = {conflate, conflate}; int rc = pipepair (parents, new_pipes, hwms, conflates); + if (!conflate) { + new_pipes[0]->set_hwms_boost(peer.options.sndhwm, peer.options.rcvhwm); + new_pipes[1]->set_hwms_boost(options.sndhwm, options.rcvhwm); + } + errno_assert (rc == 0); if (!peer.socket) { @@ -1249,6 +1255,18 @@ void zmq::socket_base_t::process_term (int linger_) own_t::process_term (linger_); } +void zmq::socket_base_t::update_pipe_options(int option_) +{ + if (option_ == ZMQ_SNDHWM || option_ == ZMQ_RCVHWM) + { + for (pipes_t::size_type i = 0; i != pipes.size(); ++i) + { + pipes[i]->set_hwms(options.rcvhwm, options.sndhwm); + } + } + +} + void zmq::socket_base_t::process_destroy () { destroyed = true; diff --git a/src/socket_base.hpp b/src/socket_base.hpp index 682b8c75..56062b5b 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -232,6 +232,8 @@ namespace zmq void process_bind (zmq::pipe_t *pipe_); void process_term (int linger_); + void update_pipe_options(int option_); + // Socket's mailbox object. i_mailbox* mailbox; diff --git a/tests/test_sockopt_hwm.cpp b/tests/test_sockopt_hwm.cpp index b4ab2af0..a8b22f40 100644 --- a/tests/test_sockopt_hwm.cpp +++ b/tests/test_sockopt_hwm.cpp @@ -1,77 +1,145 @@ #include "testutil.hpp" -void test_valid_hwm_change() +const int MAX_SENDS = 10000; + +void test_change_before_connected() { - void *ctx = zmq_ctx_new (); - assert (ctx); - int rc; + int rc; + void *ctx = zmq_ctx_new(); - void *bind_socket = zmq_socket (ctx, ZMQ_SUB); - assert (bind_socket); + void *bind_socket = zmq_socket(ctx, ZMQ_PUSH); + void *connect_socket = zmq_socket(ctx, ZMQ_PULL); - int val = 500; - rc = zmq_setsockopt(bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); - assert (rc == 0); + int val = 2; + rc = zmq_setsockopt(connect_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert(rc == 0); + rc = zmq_setsockopt(bind_socket, ZMQ_SNDHWM, &val, sizeof(val)); + assert(rc == 0); - rc = zmq_bind (bind_socket, "inproc://a"); - assert (rc == 0); + zmq_connect(connect_socket, "inproc://a"); + zmq_bind(bind_socket, "inproc://a"); - size_t placeholder = sizeof(val); - val = 0; - rc = zmq_getsockopt(bind_socket, ZMQ_RCVHWM, &val, &placeholder); - assert (rc == 0); - assert(val == 500); + size_t placeholder = sizeof(val); + val = 0; + rc = zmq_getsockopt(bind_socket, ZMQ_SNDHWM, &val, &placeholder); + assert(rc == 0); + assert(val == 2); + + int send_count = 0; + while (send_count < MAX_SENDS && zmq_send(bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) + ++send_count; + + assert(send_count == 4); + + zmq_close(bind_socket); + zmq_close(connect_socket); + zmq_ctx_term(ctx); } - -/** - * Test that zmq_setsockopt() fails to change the RCVHWM when called - * after a call to zmq_bind(). - */ -void test_invalid_hwm_change_bind() +void test_change_after_connected() { - void *ctx = zmq_ctx_new (); - assert (ctx); - int rc; + int rc; + void *ctx = zmq_ctx_new(); - void *bind_socket = zmq_socket (ctx, ZMQ_SUB); - assert (bind_socket); + void *bind_socket = zmq_socket(ctx, ZMQ_PUSH); + void *connect_socket = zmq_socket(ctx, ZMQ_PULL); - rc = zmq_bind (bind_socket, "inproc://a"); - assert (rc == 0); + int val = 1; + rc = zmq_setsockopt(connect_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert(rc == 0); + rc = zmq_setsockopt(bind_socket, ZMQ_SNDHWM, &val, sizeof(val)); + assert(rc == 0); - int val = 500; - rc = zmq_setsockopt (bind_socket, ZMQ_RCVHWM, &val, sizeof(val)); - assert (rc == -1); + zmq_connect(connect_socket, "inproc://a"); + zmq_bind(bind_socket, "inproc://a"); - zmq_close (bind_socket); - zmq_ctx_term (ctx); + val = 5; + rc = zmq_setsockopt(bind_socket, ZMQ_SNDHWM, &val, sizeof(val)); + assert(rc == 0); + + size_t placeholder = sizeof(val); + val = 0; + rc = zmq_getsockopt(bind_socket, ZMQ_SNDHWM, &val, &placeholder); + assert(rc == 0); + assert(val == 5); + + int send_count = 0; + while (send_count < MAX_SENDS && zmq_send(bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) + ++send_count; + + assert(send_count == 6); + + zmq_close(bind_socket); + zmq_close(connect_socket); + zmq_ctx_term(ctx); } -void test_invalid_hwm_change_connect() +void test_decrease_when_full() { - void *ctx = zmq_ctx_new(); - assert(ctx); - int rc; + int rc; + void *ctx = zmq_ctx_new(); - void *connect_socket = zmq_socket (ctx, ZMQ_SUB); - assert(connect_socket); + void *bind_socket = zmq_socket(ctx, ZMQ_PUSH); + void *connect_socket = zmq_socket(ctx, ZMQ_PULL); - rc = zmq_connect (connect_socket, "inproc://a"); - assert(rc == 0); + int val = 1; + rc = zmq_setsockopt(connect_socket, ZMQ_RCVHWM, &val, sizeof(val)); + assert(rc == 0); - int val = 500; - rc = zmq_setsockopt (connect_socket, ZMQ_RCVHWM, &val, sizeof(val)); - assert(rc == -1); + val = 100; + rc = zmq_setsockopt(bind_socket, ZMQ_SNDHWM, &val, sizeof(val)); + assert(rc == 0); - zmq_close (connect_socket); - zmq_ctx_term (ctx); + zmq_bind(bind_socket, "inproc://a"); + zmq_connect(connect_socket, "inproc://a"); + + // Fill up to hwm + int send_count = 0; + while (send_count < MAX_SENDS && zmq_send(bind_socket, &send_count, sizeof(send_count), ZMQ_DONTWAIT) == sizeof(send_count)) + ++send_count; + assert(send_count == 101); + + // Descrease snd hwm + val = 70; + rc = zmq_setsockopt(bind_socket, ZMQ_SNDHWM, &val, sizeof(val)); + assert(rc == 0); + + size_t placeholder = sizeof(val); + val = 0; + rc = zmq_getsockopt(bind_socket, ZMQ_SNDHWM, &val, &placeholder); + assert(rc == 0); + assert(val == 70); + + // Read out all data (should get up to previous hwm worth so none were dropped) + int read_count = 0; + int read_data = 0; + while (read_count < MAX_SENDS && zmq_recv(connect_socket, &read_data, sizeof(read_data), ZMQ_DONTWAIT) == sizeof(read_data)) { + assert(read_count == read_data); + ++read_count; + } + + assert(read_count == 101); + + // Give io thread some time to catch up + msleep(10); + + // Fill up to new hwm + send_count = 0; + while (send_count < MAX_SENDS && zmq_send(bind_socket, &send_count, sizeof(send_count), ZMQ_DONTWAIT) == sizeof(send_count)) + ++send_count; + + // Really this should be 71, but the lwm stuff kicks in doesn't seem quite right + assert(send_count > 0); + + zmq_close(bind_socket); + zmq_close(connect_socket); + zmq_ctx_term(ctx); } int main() { - test_valid_hwm_change(); - test_invalid_hwm_change_bind(); - test_invalid_hwm_change_connect(); + test_change_before_connected(); + test_change_after_connected(); + test_decrease_when_full(); } From dc949624e1142901b3dab681ee34b478320078dd Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Fri, 5 Jun 2015 19:06:36 +0100 Subject: [PATCH 040/108] Handle infinite hwms properly --- src/pipe.cpp | 14 ++++++++++++-- tests/test_hwm.cpp | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pipe.cpp b/src/pipe.cpp index 60137f9a..be33fed0 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -520,8 +520,18 @@ void zmq::pipe_t::hiccup () void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { - lwm = compute_lwm(inhwm_ + inhwmboost); - hwm = outhwm_ + outhwmboost; + int in = inhwm_ + inhwmboost; + int out = outhwm_ + outhwmboost; + + // if either send or recv side has hwm <= 0 it means infinite so we should set hwms infinite + if (inhwm_ <= 0 || inhwmboost <= 0) + in = 0; + + if (outhwm_ <= 0 || outhwmboost <= 0) + out = 0; + + lwm = compute_lwm(in); + hwm = out; } void zmq::pipe_t::set_hwms_boost(int inhwmboost_, int outhwmboost_) diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index e7ad5906..0729fc53 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -278,13 +278,13 @@ int main (void) count = test_inproc_connect_first (0, 0); assert (count == MAX_SENDS); - // Infinite send buffer + // Infinite receive buffer count = test_inproc_bind_first (1, 0); assert (count == MAX_SENDS); count = test_inproc_connect_first (1, 0); assert (count == MAX_SENDS); - // Infinite receive buffer + // Infinite send buffer count = test_inproc_bind_first (0, 1); assert (count == MAX_SENDS); count = test_inproc_connect_first (0, 1); From 4ad9a5e5702c5e75f5e816d2263bb646dbeb33b8 Mon Sep 17 00:00:00 2001 From: Kapp Arnaud Date: Fri, 5 Jun 2015 22:10:46 +0200 Subject: [PATCH 041/108] Update documentation for zmq_setsockopt. Pull request #1426 now allow for changing the watermark after and connect() or a bind(). This patch reflect the change in the documentation. Also closes #1416. --- doc/zmq_setsockopt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 031c406f..e70d5a3b 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -14,8 +14,8 @@ SYNOPSIS Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_LINGER, ZMQ_ROUTER_HANDOVER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, -ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, and ZMQ_REQ_RELAXED, only take effect for -subsequent socket bind/connects. +ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, ZMQ_REQ_RELAXED, ZMQ_SNDHWM +and ZMQ_RCVHWM, only take effect for subsequent socket bind/connects. Specifically, security options take effect for subsequent bind/connect calls, and can be changed at any time to affect subsequent binds and/or connects. From 45610c354da7dfbaf75d902ed4172c86cb7c0ef8 Mon Sep 17 00:00:00 2001 From: Jason Unovitch Date: Fri, 5 Jun 2015 21:43:39 -0400 Subject: [PATCH 042/108] Enable install of man pages when BUILD_DOC is not set by shifting INSTALL_MAN outside of BUILD_DOC's if/endif --- doc/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index f19cba10..0f1c092b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -32,13 +32,13 @@ MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) EXTRA_DIST = asciidoc.conf $(MAN_TXT) -if BUILD_DOC -EXTRA_DIST += $(MAN_HTML) - if INSTALL_MAN dist_man_MANS = $(MAN_DOC) endif +if BUILD_DOC +EXTRA_DIST += $(MAN_HTML) + SUFFIXES=.html .txt .xml .3 .7 .txt.html: From c35971a6031db8997f34d27e2ce97cbc17c8f7e1 Mon Sep 17 00:00:00 2001 From: Kapp Arnaud Date: Sun, 7 Jun 2015 02:21:32 +0200 Subject: [PATCH 043/108] Fix initialization order. Fixes #1431. --- src/decoder.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 5458992b..b6dc9e90 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -47,8 +47,8 @@ namespace zmq { public: c_single_allocator(size_t bufsize_): - buf((unsigned char*) malloc (bufsize) ), - bufsize(bufsize_) + bufsize(bufsize_), + buf((unsigned char*) malloc (bufsize)) { alloc_assert (buf); } @@ -74,8 +74,8 @@ namespace zmq } private: - unsigned char* buf; size_t bufsize; + unsigned char* buf; c_single_allocator( c_single_allocator const& ); c_single_allocator& operator=(c_single_allocator const&); From 158d77d63e7398bb53f1f0892bd5481981a0b046 Mon Sep 17 00:00:00 2001 From: Min RK Date: Sat, 6 Jun 2015 21:05:32 -0700 Subject: [PATCH 044/108] don't check POLLOUT for single-socket proxies --- src/proxy.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/proxy.cpp b/src/proxy.cpp index 738a77ae..6e05d8a8 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -142,10 +142,14 @@ int zmq::proxy ( return -1; // Get the pollout separately because when combining this with pollin it maxes the CPU - // because pollout shall most of the time return directly - rc = zmq_poll (&itemsout [0], 2, 0); - if (unlikely (rc < 0)) - return -1; + // because pollout shall most of the time return directly. + // POLLOUT is only checked when frontend and backend sockets are not the same. + if (frontend_ != backend_) { + rc = zmq_poll (&itemsout [0], 2, 0); + if (unlikely (rc < 0)) { + return -1; + } + } // Process a control command if any if (control_ && items [2].revents & ZMQ_POLLIN) { @@ -180,13 +184,14 @@ int zmq::proxy ( // Process a request if (state == active && items [0].revents & ZMQ_POLLIN - && itemsout [1].revents & ZMQ_POLLOUT) { + && (frontend_ == backend_ || itemsout [1].revents & ZMQ_POLLOUT)) { rc = forward(frontend_, backend_, capture_,msg); if (unlikely (rc < 0)) return -1; } // Process a reply if (state == active + && frontend_ != backend_ && items [1].revents & ZMQ_POLLIN && itemsout [0].revents & ZMQ_POLLOUT) { rc = forward(backend_, frontend_, capture_,msg); From f34cc24bd733f799525f334d11ecf8431f54322f Mon Sep 17 00:00:00 2001 From: Min RK Date: Sat, 6 Jun 2015 21:05:55 -0700 Subject: [PATCH 045/108] test proxy with single REP socket --- Makefile.am | 4 + tests/CMakeLists.txt | 1 + tests/test_proxy_single_socket.cpp | 113 +++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 tests/test_proxy_single_socket.cpp diff --git a/Makefile.am b/Makefile.am index e58511d6..ae12755a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -340,6 +340,7 @@ test_apps = \ tests/test_inproc_connect \ tests/test_issue_566 \ tests/test_proxy \ + tests/test_proxy_single_socket \ tests/test_proxy_terminate \ tests/test_many_sockets \ tests/test_ipc_wildcard \ @@ -495,6 +496,9 @@ tests_test_issue_566_LDADD = src/libzmq.la tests_test_proxy_SOURCES = tests/test_proxy.cpp tests_test_proxy_LDADD = src/libzmq.la +tests_test_proxy_single_socket_SOURCES = tests/test_proxy_single_socket.cpp +tests_test_proxy_single_socket_LDADD = src/libzmq.la + tests_test_proxy_terminate_SOURCES = tests/test_proxy_terminate.cpp tests_test_proxy_terminate_LDADD = src/libzmq.la diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b166e6d3..76584f42 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,6 +56,7 @@ if(NOT WIN32) test_reqrep_ipc test_abstract_ipc test_proxy + test_proxy_single_socket test_proxy_terminate test_filter_ipc ) diff --git a/tests/test_proxy_single_socket.cpp b/tests/test_proxy_single_socket.cpp new file mode 100644 index 00000000..bd63f7e3 --- /dev/null +++ b/tests/test_proxy_single_socket.cpp @@ -0,0 +1,113 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of libzmq, the ZeroMQ core engine in C++. + + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" +#include "../include/zmq_utils.h" + + + +// This is our server task. +// It runs a proxy with a single REP socket as both frontend and backend. + +void +server_task (void *ctx) +{ + void *rep = zmq_socket (ctx, ZMQ_REP); + assert (rep); + int rc = zmq_bind (rep, "tcp://127.0.0.1:5563"); + assert (rc == 0); + + // Control socket receives terminate command from main over inproc + void *control = zmq_socket (ctx, ZMQ_SUB); + assert (control); + rc = zmq_setsockopt (control, ZMQ_SUBSCRIBE, "", 0); + assert (rc == 0); + rc = zmq_connect (control, "inproc://control"); + assert (rc == 0); + + // Use rep as both frontend and backend + zmq_proxy_steerable (rep, rep, NULL, control); + + rc = zmq_close (rep); + assert (rc == 0); + rc = zmq_close (control); + assert (rc == 0); +} + + +// The main thread simply starts several clients and a server, and then +// waits for the server to finish. + +int main (void) +{ + setup_test_environment (); + + void *ctx = zmq_ctx_new (); + assert (ctx); + // client socket pings proxy over tcp + void *req = zmq_socket (ctx, ZMQ_REQ); + assert (req); + int rc = zmq_connect (req, "tcp://127.0.0.1:5563"); + assert (rc == 0); + + // Control socket receives terminate command from main over inproc + void *control = zmq_socket (ctx, ZMQ_PUB); + assert (control); + rc = zmq_bind (control, "inproc://control"); + assert (rc == 0); + + void *server_thread = zmq_threadstart(&server_task, ctx); + + char buf[255]; + rc = zmq_send(req, "msg1", 4, 0); + assert (rc == 4); + rc = zmq_recv(req, buf, 255, 0); + assert (rc == 4); + assert (memcmp (buf, "msg1", 4) == 0); + + rc = zmq_send(req, "msg22", 5, 0); + assert (rc == 5); + rc = zmq_recv(req, buf, 255, 0); + assert (rc == 5); + assert (memcmp (buf, "msg22", 5) == 0); + + rc = zmq_send (control, "TERMINATE", 9, 0); + assert (rc == 9); + + rc = zmq_close (control); + assert (rc == 0); + rc = zmq_close (req); + assert (rc == 0); + + zmq_threadclose (server_thread); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); + return 0; +} From fdb7d68056a2a82b11d54089903fb90b41779601 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 8 Jun 2015 13:16:50 -0700 Subject: [PATCH 046/108] test zmq_msg custom free-function new allocation caused reference counters to lose track on copy --- Makefile.am | 6 +- tests/CMakeLists.txt | 1 + tests/test_msg_ffn.cpp | 138 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 tests/test_msg_ffn.cpp diff --git a/Makefile.am b/Makefile.am index ae12755a..20e764e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -308,6 +308,7 @@ test_apps = \ tests/test_sub_forward \ tests/test_invalid_rep \ tests/test_msg_flags \ + tests/test_msg_ffn \ tests/test_connect_resolve \ tests/test_immediate \ tests/test_last_endpoint \ @@ -400,6 +401,9 @@ tests_test_invalid_rep_LDADD = src/libzmq.la tests_test_msg_flags_SOURCES = tests/test_msg_flags.cpp tests_test_msg_flags_LDADD = src/libzmq.la +tests_test_msg_ffn_SOURCES = tests/test_msg_ffn.cpp +tests_test_msg_ffn_LDADD = src/libzmq.la + tests_test_connect_resolve_SOURCES = tests/test_connect_resolve.cpp tests_test_connect_resolve_LDADD = src/libzmq.la @@ -639,7 +643,7 @@ check_PROGRAMS = ${test_apps} # Run the test cases TESTS = $(test_apps) -XFAIL_TESTS = +XFAIL_TESTS = tests/test_msg_ffn if !ON_LINUX XFAIL_TESTS += tests/test_abstract_ipc diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 76584f42..0086b651 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,6 +12,7 @@ set(tests test_sub_forward test_invalid_rep test_msg_flags + test_msg_ffn test_connect_resolve test_immediate test_last_endpoint diff --git a/tests/test_msg_ffn.cpp b/tests/test_msg_ffn.cpp new file mode 100644 index 00000000..9bd95174 --- /dev/null +++ b/tests/test_msg_ffn.cpp @@ -0,0 +1,138 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of libzmq, the ZeroMQ core engine in C++. + + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" + +void ffn(void *data, void *hint) { + // Signal that ffn has been called by writing "freed" to hint + memcpy(hint, (void *) "freed", 5); +} + +int main (void) { + setup_test_environment(); + // Create the infrastructure + void *ctx = zmq_ctx_new (); + assert (ctx); + + void *router = zmq_socket (ctx, ZMQ_ROUTER); + assert (router); + + int rc = zmq_bind (router, "tcp://127.0.0.1:5555"); + assert (rc == 0); + + void *dealer = zmq_socket (ctx, ZMQ_DEALER); + assert (dealer); + + rc = zmq_connect (dealer, "tcp://127.0.0.1:5555"); + assert (rc == 0); + + // Test that creating and closing a message triggers ffn + zmq_msg_t msg; + char hint[5]; + char data[255]; + memcpy(data, (void *) "data", 4); + memcpy(hint, (void *) "hint", 4); + rc = zmq_msg_init_data(&msg, (void *)data, 255, ffn, (void*)hint); + assert (rc == 0); + rc = zmq_msg_close(&msg); + assert (rc == 0); + + usleep(50000); + assert (memcmp(hint, "freed", 5) == 0); + memcpy(hint, (void *) "hint", 4); + + // Making and closing a copy triggers ffn + zmq_msg_t msg2; + zmq_msg_init(&msg2); + rc = zmq_msg_init_data(&msg, (void *)data, 255, ffn, (void *)hint); + assert (rc == 0); + rc = zmq_msg_copy(&msg2, &msg); + assert (rc == 0); + rc = zmq_msg_close(&msg2); + assert (rc == 0); + rc = zmq_msg_close(&msg); + assert (rc == 0); + + usleep(50000); + assert (memcmp(hint, "freed", 5) == 0); + memcpy(hint, (void *) "hint", 4); + + // Test that sending a message triggers ffn + rc = zmq_msg_init_data(&msg, (void *)data, 255, ffn, (void *)hint); + assert (rc == 0); + + zmq_msg_send(&msg, dealer, 0); + char buf[255]; + rc = zmq_recv(router, buf, 255, 0); + assert (rc > -1); + rc = zmq_recv(router, buf, 255, 0); + assert (rc == 255); + assert (memcmp(data, buf, 5) == 0); + + usleep(50000); + assert (memcmp(hint, "freed", 5) == 0); + memcpy(hint, (void *) "hint", 4); + rc = zmq_msg_close(&msg); + assert (rc == 0); + + // Sending a copy of a message triggers ffn + rc = zmq_msg_init(&msg2); + assert (rc == 0); + rc = zmq_msg_init_data(&msg, (void *)data, 255, ffn, (void *)hint); + assert (rc == 0); + rc = zmq_msg_copy(&msg2, &msg); + assert (rc == 0); + + zmq_msg_send(&msg, dealer, 0); + rc = zmq_recv(router, buf, 255, 0); + assert (rc > -1); + rc = zmq_recv(router, buf, 255, 0); + assert (rc == 255); + assert (memcmp(data, buf, 5) == 0); + rc = zmq_msg_close(&msg2); + assert (rc == 0); + rc = zmq_msg_close(&msg); + assert (rc == 0); + + usleep(50000); + assert (memcmp(hint, "freed", 5) == 0); + memcpy(hint, (void *) "hint", 4); + + // Deallocate the infrastructure. + rc = zmq_close (router); + assert (rc == 0); + + rc = zmq_close (dealer); + assert (rc == 0); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); + return 0 ; +} + From 8484e1606d90ad9139cb34ab4a049f9896f74981 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Wed, 10 Jun 2015 16:43:59 +0100 Subject: [PATCH 047/108] Fix windows build --- tests/test_msg_ffn.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_msg_ffn.cpp b/tests/test_msg_ffn.cpp index 9bd95174..2eb1bea0 100644 --- a/tests/test_msg_ffn.cpp +++ b/tests/test_msg_ffn.cpp @@ -63,7 +63,7 @@ int main (void) { rc = zmq_msg_close(&msg); assert (rc == 0); - usleep(50000); + msleep(50); assert (memcmp(hint, "freed", 5) == 0); memcpy(hint, (void *) "hint", 4); @@ -79,7 +79,7 @@ int main (void) { rc = zmq_msg_close(&msg); assert (rc == 0); - usleep(50000); + msleep(50); assert (memcmp(hint, "freed", 5) == 0); memcpy(hint, (void *) "hint", 4); @@ -95,7 +95,7 @@ int main (void) { assert (rc == 255); assert (memcmp(data, buf, 5) == 0); - usleep(50000); + msleep(50); assert (memcmp(hint, "freed", 5) == 0); memcpy(hint, (void *) "hint", 4); rc = zmq_msg_close(&msg); @@ -120,7 +120,7 @@ int main (void) { rc = zmq_msg_close(&msg); assert (rc == 0); - usleep(50000); + msleep(50); assert (memcmp(hint, "freed", 5) == 0); memcpy(hint, (void *) "hint", 4); From f696d0399c46fe570baeb77e87923a9297d51e01 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Wed, 10 Jun 2015 16:47:23 +0100 Subject: [PATCH 048/108] Fix tabbing --- tests/test_msg_ffn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msg_ffn.cpp b/tests/test_msg_ffn.cpp index 2eb1bea0..a326dc02 100644 --- a/tests/test_msg_ffn.cpp +++ b/tests/test_msg_ffn.cpp @@ -63,7 +63,7 @@ int main (void) { rc = zmq_msg_close(&msg); assert (rc == 0); - msleep(50); + msleep(50); assert (memcmp(hint, "freed", 5) == 0); memcpy(hint, (void *) "hint", 4); From 6f1d1142d1a11b51e78eb4408f34b87fe4c7f7e6 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Thu, 11 Jun 2015 23:53:23 +0200 Subject: [PATCH 049/108] Problem: 4.1 broke the ABI yet did not bump ABI number Solution: bump to ABI version 5 --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9f491b73..a383d7ac 100644 --- a/configure.ac +++ b/configure.ac @@ -31,9 +31,10 @@ AC_SUBST(PACKAGE_VERSION) # ZeroMQ version 3.0: 2:0:0 (ABI version 2) # ZeroMQ version 3.1: 3:0:0 (ABI version 3) # ZeroMQ version 4.0: 4:0:0 (ABI version 4) +# ZeroMQ version 4.1: 5:0:0 (ABI version 5) # # libzmq -version-info current:revision:age -LTVER="4:0:0" +LTVER="5:0:0" AC_SUBST(LTVER) # Take a copy of original flags From 8ffd723271fd8d4e44a177d58357d0823803acfa Mon Sep 17 00:00:00 2001 From: Kapp Arnaud Date: Sat, 13 Jun 2015 22:08:14 +0200 Subject: [PATCH 050/108] Probably fix build issue on Solaris. See #1220 recent comments. This change is untested yet seems safe. --- src/tcp_address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index c8689322..cda27365 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -86,7 +86,7 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_ // Find the interface with the specified name and AF_INET family. bool found = false; lifreq *ifrp = ifc.lifc_req; - for (int n = 0; n < (int) (ifc.lifc_len / sizeof lifreq); + for (int n = 0; n < (int) (ifc.lifc_len / sizeof (lifreq)); n ++, ifrp ++) { if (!strcmp (nic_, ifrp->lifr_name)) { rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp); From dfe19080089450bf4973a59b387be891fe0ca9ef Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Wed, 10 Jun 2015 22:09:55 +0200 Subject: [PATCH 051/108] Fixed wrong buffer end detection in v2_decoder. zero-copy msg_t::init cannot be used when the message exceeds either the buffer end or the last received byte. To detect this, the buffer is now resized to the numnber of received bytes. --- src/decoder.hpp | 9 +++++++++ src/i_decoder.hpp | 3 +++ src/raw_decoder.hpp | 2 +- src/stream_engine.cpp | 3 +++ src/v2_decoder.cpp | 7 ++++++- src/v2_decoder.hpp | 7 +++++++ 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index b6dc9e90..4d00d45d 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -73,6 +73,10 @@ namespace zmq return bufsize; } + void resize(size_t new_size) + { + bufsize = new_size; + } private: size_t bufsize; unsigned char* buf; @@ -190,6 +194,11 @@ namespace zmq return 0; } + virtual void resize_buffer(size_t new_size) + { + allocator->resize(new_size); + } + protected: // Prototype of state machine action. Action should return false if diff --git a/src/i_decoder.hpp b/src/i_decoder.hpp index b003cf81..038d406e 100644 --- a/src/i_decoder.hpp +++ b/src/i_decoder.hpp @@ -46,6 +46,7 @@ namespace zmq virtual void get_buffer (unsigned char **data_, size_t *size_) = 0; + virtual void resize_buffer(size_t) = 0; // Decodes data pointed to by data_. // When a message is decoded, 1 is returned. // When the decoder needs more data, 0 is returnd. @@ -54,6 +55,8 @@ namespace zmq size_t &processed) = 0; virtual msg_t *msg () = 0; + + }; } diff --git a/src/raw_decoder.hpp b/src/raw_decoder.hpp index fc88add1..31310174 100644 --- a/src/raw_decoder.hpp +++ b/src/raw_decoder.hpp @@ -56,7 +56,7 @@ namespace zmq virtual msg_t *msg () { return &in_progress; } - + virtual void resize_buffer(size_t) {} private: diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 7d750b73..8c8eb8a4 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -295,6 +295,7 @@ void zmq::stream_engine_t::in_event () decoder->get_buffer (&inpos, &bufsize); const int rc = tcp_read (s, inpos, bufsize); + if (rc == 0) { error (connection_error); return; @@ -307,6 +308,8 @@ void zmq::stream_engine_t::in_event () // Adjust input size insize = static_cast (rc); + // Adjust buffer size to received bytes + decoder->resize_buffer(insize); } int rc = 0; diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 9eb8d12f..cb22d91c 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -43,7 +43,8 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): buf(NULL), - bufsize( bufsize_ ) + bufsize( 0 ), + maxsize( bufsize_ ) { } @@ -71,6 +72,7 @@ unsigned char* zmq::shared_message_memory_allocator::allocate() new(buf) atomic_counter_t(1); } + bufsize = maxsize; return buf + sizeof( zmq::atomic_counter_t); } @@ -78,12 +80,15 @@ void zmq::shared_message_memory_allocator::deallocate() { free(buf); buf = NULL; + bufsize = 0; } unsigned char* zmq::shared_message_memory_allocator::release() { unsigned char* b = buf; buf = NULL; + bufsize = 0; + return b; } diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index 642b4b78..fff7a188 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -80,9 +80,16 @@ namespace zmq return buf; } + void resize(size_t new_size) + { + bufsize = new_size; + } + private: unsigned char* buf; size_t bufsize; + size_t maxsize; + zmq::atomic_counter_t* msg_refcnt; }; // Decoder for ZMTP/2.x framing protocol. Converts data stream into messages. From 51cb57e2c9d187604e46e8d85f69cc73f01a211f Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Sat, 13 Jun 2015 17:30:36 +0200 Subject: [PATCH 052/108] Fixed wrong handling of shared messages The shared reference count was not shared but copied. msg_t cannot store the refcnt itsef but has to store a pointer to an externally allocated (shared) refcnter. The changes to lmsg are reverted to use content_t again. Howver, this introduces an allocation in v2_decoder when creating the message which can be avoided. When allocating the reception buffer, space is allocated for the maximum number of reference counts (8192 / max_vsm_size = 8192/64 = 128 zmq:atomic_counter objects). This increases the buffer by 128*sizeof(atomic_counter) = 128*4 = 512 bytes only. When creating a message, the refcnt member is set to the address of one of the pre-allocated atomic_counter_t objects. To do so, a new msg_t type zcmsg is introduced because msg::copy must discriminate between the message types when releasing memory. --- Makefile.am | 2 +- src/msg.cpp | 212 ++++++++++++++++++++++++++++++++------------- src/msg.hpp | 97 +++++++++++++-------- src/v2_decoder.cpp | 29 ++++--- src/v2_decoder.hpp | 8 +- 5 files changed, 235 insertions(+), 113 deletions(-) diff --git a/Makefile.am b/Makefile.am index 20e764e1..4d43c2ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -643,7 +643,7 @@ check_PROGRAMS = ${test_apps} # Run the test cases TESTS = $(test_apps) -XFAIL_TESTS = tests/test_msg_ffn +XFAIL_TESTS = if !ON_LINUX XFAIL_TESTS += tests/test_abstract_ipc diff --git a/src/msg.cpp b/src/msg.cpp index bed4cce8..73abb26e 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -45,27 +45,35 @@ typedef char zmq_msg_size_check [2 * ((sizeof (zmq::msg_t) == sizeof (zmq_msg_t)) != 0) - 1]; -// check whether the size of atomic_counter_t matches the size of the wrapped integer -// to ensure that the lsmg union is correctly aligned -typedef char zmq_msg_size_check - [2 * ((sizeof (zmq::atomic_counter_t) == sizeof (zmq::atomic_counter_t::integer_t)) != 0) - 1]; - bool zmq::msg_t::check () { return u.base.type >= type_min && u.base.type <= type_max; } -int zmq::msg_t::init (void *data_, size_t size_, msg_free_fn *ffn_, void *hint_) +int zmq::msg_t::init (void* data_, size_t size_, + msg_free_fn* ffn_, void* hint, + zmq::atomic_counter_t* refcnt_) { - if (size_ <= max_vsm_size) + if (size_ < max_vsm_size) { + int const rc = init_size(size_); + + if (rc != -1) + { + memcpy(data(), data_, size_); + return 0; + } + else + { + return -1; + } + } + else if(refcnt_) { - int rc = init_size(size_); - memcpy(data(), data_, size_); - return rc; + return init_external_storage(data_, size_, refcnt_, ffn_, hint); } else { - return init_data(data_, size_, ffn_, hint_); + return init_data(data_, size_, ffn_, hint); } } @@ -95,22 +103,47 @@ int zmq::msg_t::init_size (size_t size_) u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.routing_id = 0; - u.lmsg.data = malloc(size_); - if (unlikely (!u.lmsg.data)) { + u.lmsg.content = + (content_t*) malloc (sizeof (content_t) + size_); + if (unlikely (!u.lmsg.content)) { errno = ENOMEM; return -1; } - u.lmsg.size = size_; - u.lmsg.ffn = NULL; - u.lmsg.hint = NULL; - new (&u.lmsg.refcnt.counter) zmq::atomic_counter_t (); + u.lmsg.content->data = u.lmsg.content + 1; + u.lmsg.content->size = size_; + u.lmsg.content->ffn = NULL; + u.lmsg.content->hint = NULL; + new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); } return 0; } -int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_, - void *hint_) +int zmq::msg_t::init_external_storage(void *data_, size_t size_, zmq::atomic_counter_t* ctr, + msg_free_fn *ffn_, void *hint_) +{ + zmq_assert(NULL != data_); + zmq_assert(NULL != ctr); + + file_desc = -1; + + u.zclmsg.metadata = NULL; + u.zclmsg.type = type_zclmsg; + u.zclmsg.flags = 0; + u.zclmsg.routing_id = 0; + + u.zclmsg.data = data_; + u.zclmsg.size = size_; + u.zclmsg.ffn = ffn_; + u.zclmsg.hint = hint_; + u.zclmsg.refcnt = ctr; + new (u.zclmsg.refcnt) zmq::atomic_counter_t(); + + return 0; +} + +int zmq::msg_t::init_data (void *data_, size_t size_, + msg_free_fn *ffn_, void *hint_) { // If data is NULL and size is not 0, a segfault // would occur once the data is accessed @@ -132,12 +165,17 @@ int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_, u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.routing_id = 0; + u.lmsg.content = (content_t*) malloc (sizeof (content_t)); + if (!u.lmsg.content) { + errno = ENOMEM; + return -1; + } - u.lmsg.data = data_; - u.lmsg.size = size_; - u.lmsg.ffn = ffn_; - u.lmsg.hint = hint_; - new (&u.lmsg.refcnt.counter) zmq::atomic_counter_t (); + u.lmsg.content->data = data_; + u.lmsg.content->size = size_; + u.lmsg.content->ffn = ffn_; + u.lmsg.content->hint = hint_; + new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); } return 0; @@ -152,13 +190,6 @@ int zmq::msg_t::init_delimiter () return 0; } -zmq::atomic_counter_t& zmq::msg_t::msg_counter() -{ - zmq_assert( is_lmsg() ); - void* ptr = static_cast( &u.lmsg.refcnt.counter ); - return *static_cast( ptr ); -} - int zmq::msg_t::close () { // Check the validity of the message. @@ -172,14 +203,34 @@ int zmq::msg_t::close () // If the content is not shared, or if it is shared and the reference // count has dropped to zero, deallocate it. if (!(u.lmsg.flags & msg_t::shared) || - !msg_counter().sub (1)) { + !u.lmsg.content->refcnt.sub (1)) { - if (u.lmsg.ffn) { - u.lmsg.ffn(u.lmsg.data, u.lmsg.hint); - } - else { - free (u.lmsg.data); - } + // We used "placement new" operator to initialize the reference + // counter so we call the destructor explicitly now. + u.lmsg.content->refcnt.~atomic_counter_t (); + + if (u.lmsg.content->ffn) + u.lmsg.content->ffn (u.lmsg.content->data, + u.lmsg.content->hint); + free (u.lmsg.content); + } + } + + if (is_zcmsg()) + { + zmq_assert( u.zclmsg.ffn ); + + // If the content is not shared, or if it is shared and the reference + // count has dropped to zero, deallocate it. + if (!(u.zclmsg.flags & msg_t::shared) || + !u.zclmsg.refcnt->sub (1)) { + + // We used "placement new" operator to initialize the reference + // counter so we call the destructor explicitly now. + u.zclmsg.refcnt->~atomic_counter_t (); + + u.zclmsg.ffn (u.zclmsg.data, + u.zclmsg.hint); } } @@ -226,18 +277,29 @@ int zmq::msg_t::copy (msg_t &src_) if (unlikely (rc < 0)) return rc; - if (src_.u.base.type == type_lmsg) { + if (src_.u.base.type == type_lmsg ) { // One reference is added to shared messages. Non-shared messages // are turned into shared messages and reference count is set to 2. if (src_.u.lmsg.flags & msg_t::shared) - src_.msg_counter().add (1); + src_.u.lmsg.content->refcnt.add (1); else { src_.u.lmsg.flags |= msg_t::shared; - src_.msg_counter().set (2); + src_.u.lmsg.content->refcnt.set (2); } } + if (src_.is_zcmsg()) { + + // One reference is added to shared messages. Non-shared messages + // are turned into shared messages and reference count is set to 2. + if (src_.u.zclmsg.flags & msg_t::shared) + src_.refcnt()->add (1); + else { + src_.u.zclmsg.flags |= msg_t::shared; + src_.refcnt()->set (2); + } + } if (src_.u.base.metadata != NULL) src_.u.base.metadata->add_ref (); @@ -256,9 +318,11 @@ void *zmq::msg_t::data () case type_vsm: return u.vsm.data; case type_lmsg: - return u.lmsg.data; + return u.lmsg.content->data; case type_cmsg: return u.cmsg.data; + case type_zclmsg: + return u.zclmsg.data; default: zmq_assert (false); return NULL; @@ -274,7 +338,9 @@ size_t zmq::msg_t::size () case type_vsm: return u.vsm.size; case type_lmsg: - return u.lmsg.size; + return u.lmsg.content->size; + case type_zclmsg: + return u.zclmsg.size; case type_cmsg: return u.cmsg.size; default: @@ -345,21 +411,21 @@ bool zmq::msg_t::is_delimiter () const return u.base.type == type_delimiter; } -bool zmq::msg_t::is_vsm () +bool zmq::msg_t::is_vsm () const { return u.base.type == type_vsm; } -bool zmq::msg_t::is_lmsg () const -{ - return u.base.type == type_lmsg; -} - -bool zmq::msg_t::is_cmsg () +bool zmq::msg_t::is_cmsg () const { return u.base.type == type_cmsg; } +bool zmq::msg_t::is_zcmsg() const +{ + return u.base.type == type_zclmsg; +} + void zmq::msg_t::add_refs (int refs_) { zmq_assert (refs_ >= 0); @@ -373,12 +439,12 @@ void zmq::msg_t::add_refs (int refs_) // VSMs, CMSGS and delimiters can be copied straight away. The only // message type that needs special care are long messages. - if (u.base.type == type_lmsg) { - if (u.lmsg.flags & msg_t::shared) - msg_counter().add (refs_); + if (u.base.type == type_lmsg || is_zcmsg() ) { + if (u.base.flags & msg_t::shared) + refcnt()->add (refs_); else { - msg_counter().set (refs_ + 1); - u.lmsg.flags |= msg_t::shared; + refcnt()->set (refs_ + 1); + u.base.flags |= msg_t::shared; } } } @@ -395,20 +461,29 @@ bool zmq::msg_t::rm_refs (int refs_) return true; // If there's only one reference close the message. - if (u.base.type != type_lmsg || !(u.lmsg.flags & msg_t::shared)) { + if ( (u.base.type != type_zclmsg && u.base.type != type_lmsg) || !(u.base.flags & msg_t::shared)) { close (); return false; } - // The only message type that needs special care are long messages. - if (!msg_counter().sub (refs_)) { + // The only message type that needs special care are long and zcopy messages. + if (!u.lmsg.content->refcnt.sub (refs_)) { // We used "placement new" operator to initialize the reference // counter so we call the destructor explicitly now. - msg_counter().~atomic_counter_t (); + u.lmsg.content->refcnt.~atomic_counter_t (); - if (u.lmsg.ffn) - u.lmsg.ffn (u.lmsg.data, u.lmsg.hint); - free (u.lmsg.data); + if (u.lmsg.content->ffn) + u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint); + free (u.lmsg.content); + + return false; + } + + if (!u.zclmsg.refcnt->sub (refs_)) { + // storage for rfcnt is provided externally + if (u.zclmsg.ffn) { + u.zclmsg.ffn(u.zclmsg.data, u.zclmsg.hint); + } return false; } @@ -427,3 +502,16 @@ int zmq::msg_t::set_routing_id(uint32_t routing_id_) return 0; } +zmq::atomic_counter_t* zmq::msg_t::refcnt() +{ + switch(u.base.type) + { + case type_lmsg: + return &u.lmsg.content->refcnt; + case type_zclmsg: + return u.zclmsg.refcnt; + default: + zmq_assert(false); + return NULL; + } +} diff --git a/src/msg.hpp b/src/msg.hpp index 6170a23a..25af87cb 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -54,6 +54,7 @@ namespace zmq class msg_t { public: + // Message flags. enum { @@ -65,12 +66,17 @@ namespace zmq }; bool check (); - int init (void *data_, size_t size_, msg_free_fn *ffn_, - void *hint_); - int init (); + int init(); + + int init (void* data, size_t size_, + msg_free_fn* ffn_, void* hint, + zmq::atomic_counter_t* refcnt_ = NULL); + int init_size (size_t size_); int init_data (void *data_, size_t size_, msg_free_fn *ffn_, - void *hint_); + void *hint_); + int init_external_storage(void *data_, size_t size_, zmq::atomic_counter_t* ctr, + msg_free_fn *ffn_, void *hint_); int init_delimiter (); int close (); int move (msg_t &src_); @@ -88,9 +94,9 @@ namespace zmq bool is_identity () const; bool is_credential () const; bool is_delimiter () const; - bool is_vsm (); - bool is_lmsg () const; - bool is_cmsg (); + bool is_vsm () const; + bool is_cmsg () const; + bool is_zcmsg() const; uint32_t get_routing_id(); int set_routing_id(uint32_t routing_id_); @@ -102,13 +108,30 @@ namespace zmq // references drops to 0, the message is closed and false is returned. bool rm_refs (int refs_); - private: - // Size in bytes of the largest message that is still copied around // rather than being reference-counted. enum { msg_t_size = 64 }; enum { max_vsm_size = msg_t_size - (8 + sizeof (metadata_t *) + 3 + sizeof(uint32_t)) }; + private: + zmq::atomic_counter_t* refcnt(); + + // Shared message buffer. Message data are either allocated in one + // continuous block along with this structure - thus avoiding one + // malloc/free pair or they are stored in used-supplied memory. + // In the latter case, ffn member stores pointer to the function to be + // used to deallocate the data. If the buffer is actually shared (there + // are at least 2 references to it) refcount member contains number of + // references. + struct content_t + { + void *data; + size_t size; + msg_free_fn *ffn; + void *hint; + zmq::atomic_counter_t refcnt; + }; + // Different message types. enum type_t { @@ -121,10 +144,12 @@ namespace zmq type_delimiter = 103, // CMSG messages point to constant data type_cmsg = 104, - type_max = 104 - }; - atomic_counter_t& msg_counter(); + // zero-copy LMSG message for v2_decoder + type_zclmsg = 105, + + type_max = 105 + }; // the file descriptor where this message originated, needs to be 64bit due to alignment int64_t file_desc; @@ -149,36 +174,36 @@ namespace zmq unsigned char flags; uint32_t routing_id; } vsm; - struct lmsg_t { + struct { metadata_t *metadata; - // Shared message buffer. Message data are either allocated in one - // continuous block along with this structure - thus avoiding one - // malloc/free pair or they are stored in used-supplied memory. - // In the latter case, ffn member stores pointer to the function to be - // used to deallocate the data. If the buffer is actually shared (there - // are at least 2 references to it) refcount member contains number of - // references. - void *data; - size_t size; - msg_free_fn *ffn; - void *hint; - // create an aligned block for an atomic_counter_t object - union aligned_atomic_counter_storage { - zmq::atomic_counter_t::integer_t maxAlign; - unsigned char counter[ sizeof(zmq::atomic_counter_t) ]; - } refcnt; + content_t *content; unsigned char unused [msg_t_size - (8 + sizeof (metadata_t *) - + sizeof(void*) - + sizeof(size_t) - + sizeof(msg_free_fn*) - + sizeof(void*) - + sizeof(aligned_atomic_counter_storage) - + 2 - + sizeof(uint32_t))]; + + sizeof (content_t*) + + 2 + + sizeof(uint32_t))]; unsigned char type; unsigned char flags; uint32_t routing_id; } lmsg; + struct { + metadata_t *metadata; + void *data; + size_t size; + msg_free_fn *ffn; + void *hint; + zmq::atomic_counter_t* refcnt; + unsigned char unused [msg_t_size - (8 + sizeof (metadata_t *) + + sizeof (void*) + + sizeof (size_t) + + sizeof (msg_free_fn*) + + sizeof (void*) + + sizeof (zmq::atomic_counter_t*) + + 2 + + sizeof(uint32_t))]; + unsigned char type; + unsigned char flags; + uint32_t routing_id; + } zclmsg; struct { metadata_t *metadata; void* data; diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index cb22d91c..57cbb681 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS @@ -44,7 +45,8 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): buf(NULL), bufsize( 0 ), - maxsize( bufsize_ ) + maxsize( bufsize_ ), + msg_refcnt( NULL ) { } @@ -67,9 +69,14 @@ unsigned char* zmq::shared_message_memory_allocator::allocate() // @todo aligmnet padding may be needed if (!buf) { - buf = (unsigned char *) malloc(bufsize + sizeof(zmq::atomic_counter_t)); + // allocate memory for reference counters together with reception buffer + size_t const maxCounters = std::ceil( (double)max_size / (double)msg_t::max_vsm_size); + size_t const allocationsize = maxsize + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); + + buf = (unsigned char *) malloc(allocationsize); alloc_assert (buf); new(buf) atomic_counter_t(1); + msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + maxsize ); } bufsize = maxsize; @@ -81,6 +88,7 @@ void zmq::shared_message_memory_allocator::deallocate() free(buf); buf = NULL; bufsize = 0; + msg_refcnt = NULL; } unsigned char* zmq::shared_message_memory_allocator::release() @@ -88,16 +96,11 @@ unsigned char* zmq::shared_message_memory_allocator::release() unsigned char* b = buf; buf = NULL; bufsize = 0; + msg_refcnt = NULL; return b; } -void zmq::shared_message_memory_allocator::reset(unsigned char* b) -{ - deallocate(); - buf = b; -} - void zmq::shared_message_memory_allocator::inc_ref() { ((zmq::atomic_counter_t*)buf)->add(1); @@ -204,6 +207,7 @@ int zmq::v2_decoder_t::size_ready(uint64_t msg_size, unsigned char const* read_p // the current message can exceed the current buffer. We have to copy the buffer // data into a new message and complete it in the next receive. + if (unlikely ((unsigned char*)read_pos + msg_size > (data() + size()))) { // a new message has started, but the size would exceed the pre-allocated arena @@ -214,12 +218,13 @@ int zmq::v2_decoder_t::size_ready(uint64_t msg_size, unsigned char const* read_p { // construct message using n bytes from the buffer as storage // increase buffer ref count - rc = in_progress.init( (unsigned char*)read_pos, - msg_size, shared_message_memory_allocator::call_dec_ref, - buffer() ); + // if the message will be a large message, pass a valid refcnt memory location as well + rc = in_progress.init( (unsigned char*)read_pos, msg_size, + shared_message_memory_allocator::call_dec_ref, buffer(), + create_refcnt() ); // For small messages, data has been copied and refcount does not have to be increased - if (in_progress.is_lmsg()) + if (in_progress.is_zcmsg()) { inc_ref(); } diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index fff7a188..8cb892bd 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -63,8 +63,6 @@ namespace zmq // the messages constructed on top of it. unsigned char* release(); - void reset(unsigned char* b); - void inc_ref(); static void call_dec_ref(void*, void* buffer); @@ -85,6 +83,12 @@ namespace zmq bufsize = new_size; } + // + zmq::atomic_counter_t* create_refcnt() + { + return msg_refcnt++; + } + private: unsigned char* buf; size_t bufsize; From e70b5efa0be876255aee6dc965e2788946c978a0 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Sat, 13 Jun 2015 22:07:54 +0200 Subject: [PATCH 053/108] Reuse buffer when no messages depend on it. --- src/v2_decoder.cpp | 54 ++++++++++++++++++++++++++-------------------- src/v2_decoder.hpp | 2 +- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 57cbb681..b4873ceb 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -45,7 +45,7 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): buf(NULL), bufsize( 0 ), - maxsize( bufsize_ ), + max_size( bufsize_ ), msg_refcnt( NULL ) { @@ -53,7 +53,9 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t buf zmq::shared_message_memory_allocator::~shared_message_memory_allocator() { - deallocate(); + if (buf) { + deallocate(); + } } unsigned char* zmq::shared_message_memory_allocator::allocate() @@ -61,25 +63,38 @@ unsigned char* zmq::shared_message_memory_allocator::allocate() if (buf) { // release reference count to couple lifetime to messages - call_dec_ref(NULL, buf); - // release pointer because we are going to create a new buffer - release(); + zmq::atomic_counter_t *c = reinterpret_cast(buf); + + // if refcnt drops to 0, there are no message using the buffer + // because either all messages have been closed or only vsm-messages + // were created + if (c->sub(1)) { + // buffer is still in use as message data. "Release" it and create a new one + // release pointer because we are going to create a new buffer + release(); + } } - // @todo aligmnet padding may be needed - if (!buf) - { + // if buf != NULL it is not used by any message so we can re-use it for the next run + if (!buf) { // allocate memory for reference counters together with reception buffer size_t const maxCounters = std::ceil( (double)max_size / (double)msg_t::max_vsm_size); - size_t const allocationsize = maxsize + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); + size_t const allocationsize = max_size + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); buf = (unsigned char *) malloc(allocationsize); alloc_assert (buf); + new(buf) atomic_counter_t(1); - msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + maxsize ); + } + else + { + // release reference count to couple lifetime to messages + zmq::atomic_counter_t *c = reinterpret_cast(buf); + c->set(1); } - bufsize = maxsize; + bufsize = max_size; + msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + max_size ); return buf + sizeof( zmq::atomic_counter_t); } @@ -108,31 +123,24 @@ void zmq::shared_message_memory_allocator::inc_ref() void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { zmq_assert( hint ); - zmq::atomic_counter_t *c = reinterpret_cast(hint); + unsigned char* buf = static_cast(hint); + zmq::atomic_counter_t *c = reinterpret_cast(buf); if (!c->sub(1)) { c->~atomic_counter_t(); - free(hint); + free(buf); + buf = NULL; } } size_t zmq::shared_message_memory_allocator::size() const { - if (buf) - { - return bufsize; - } - else - { - return 0; - } + return bufsize; } unsigned char* zmq::shared_message_memory_allocator::data() { - zmq_assert(buf); - return buf + sizeof(zmq::atomic_counter_t); } diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index 8cb892bd..44c9fe05 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -92,7 +92,7 @@ namespace zmq private: unsigned char* buf; size_t bufsize; - size_t maxsize; + size_t max_size; zmq::atomic_counter_t* msg_refcnt; }; From 15f9ee19cb895f7fb7b6d09ec64d4b82717ee1aa Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Tue, 23 Jun 2015 08:54:49 +0200 Subject: [PATCH 054/108] Solution: allow brackets in tcp ipv6 address --- src/socket_base.cpp | 5 +++-- tests/test_connect_resolve.cpp | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index bddbaf2f..79044b1a 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -717,11 +717,12 @@ int zmq::socket_base_t::connect (const char *addr_) // Following code is quick and dirty check to catch obvious errors, // without trying to be fully accurate. const char *check = address.c_str (); - if (isalnum (*check) || isxdigit (*check)) { + if (isalnum (*check) || isxdigit (*check) || *check == '[') { check++; while (isalnum (*check) || isxdigit (*check) - || *check == '.' || *check == '-' || *check == ':'|| *check == ';') + || *check == '.' || *check == '-' || *check == ':'|| *check == ';' + || *check == ']') check++; } // Assume the worst, now look for success diff --git a/tests/test_connect_resolve.cpp b/tests/test_connect_resolve.cpp index 0bfd7703..6247f61a 100644 --- a/tests/test_connect_resolve.cpp +++ b/tests/test_connect_resolve.cpp @@ -40,7 +40,10 @@ int main (void) int rc = zmq_connect (sock, "tcp://localhost:1234"); assert (rc == 0); - + + rc = zmq_connect (sock, "tcp://[::1]:1234"); + assert (rc == 0); + rc = zmq_connect (sock, "tcp://localhost:invalid"); assert (rc == -1); From fa3b5d8b0356f18089aecee62becf3f8df5fab5b Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Tue, 23 Jun 2015 14:45:51 +0300 Subject: [PATCH 055/108] Typo fix --- src/msg.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg.hpp b/src/msg.hpp index 25af87cb..1090038f 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -155,7 +155,7 @@ namespace zmq int64_t file_desc; // Note that fields shared between different message types are not - // moved to tha parent class (msg_t). This way we get tighter packing + // moved to the parent class (msg_t). This way we get tighter packing // of the data. Shared fields can be accessed via 'base' member of // the union. union { From cbb3b176a62dbd6da15d6c1a82e0dd6d01eb9e17 Mon Sep 17 00:00:00 2001 From: Jonathan Reams Date: Mon, 16 Mar 2015 21:39:16 -0400 Subject: [PATCH 056/108] Add ZMTP heartbeats This commit adds ZMTP connection heartbeats described in http://rfc.zeromq.org/spec:37/ZMTP. --- Makefile.am | 6 +- include/zmq.h | 3 + src/curve_client.cpp | 4 + src/curve_server.cpp | 4 + src/gssapi_mechanism_base.cpp | 4 + src/options.cpp | 47 ++++- src/options.hpp | 9 + src/session_base.cpp | 2 + src/stream_engine.cpp | 126 ++++++++++++- src/stream_engine.hpp | 14 ++ tests/CMakeLists.txt | 1 + tests/test_heartbeats.cpp | 329 ++++++++++++++++++++++++++++++++++ 12 files changed, 541 insertions(+), 8 deletions(-) create mode 100644 tests/test_heartbeats.cpp diff --git a/Makefile.am b/Makefile.am index 4d43c2ca..8ceba66c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -358,7 +358,8 @@ test_apps = \ tests/test_server_drop_more \ tests/test_client_drop_more \ tests/test_thread_safe \ - tests/test_socketopt_hwm + tests/test_socketopt_hwm \ + tests/test_heartbeats tests_test_system_SOURCES = tests/test_system.cpp tests_test_system_LDADD = src/libzmq.la @@ -554,7 +555,8 @@ tests_test_thread_safe_LDADD = src/libzmq.la tests_test_socketopt_hwm_SOURCES = tests/test_sockopt_hwm.cpp tests_test_socketopt_hwm_LDADD = src/libzmq.la - +tests_test_heartbeats_SOURCES = tests/test_heartbeats.cpp +tests_test_heartbeats_LDADD = src/libzmq.la if !ON_MINGW if !ON_CYGWIN diff --git a/include/zmq.h b/include/zmq.h index c99338c5..0eb31f7a 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -316,6 +316,9 @@ ZMQ_EXPORT uint32_t zmq_msg_get_routing_id(zmq_msg_t *msg); #define ZMQ_XPUB_WELCOME_MSG 72 #define ZMQ_STREAM_NOTIFY 73 #define ZMQ_INVERT_MATCHING 74 +#define ZMQ_HEARTBEAT_IVL 75 +#define ZMQ_HEARTBEAT_TTL 76 +#define ZMQ_HEARTBEAT_TIMEOUT 77 /* Message options */ #define ZMQ_MORE 1 diff --git a/src/curve_client.cpp b/src/curve_client.cpp index 0b25b32c..a7c2cc10 100644 --- a/src/curve_client.cpp +++ b/src/curve_client.cpp @@ -130,6 +130,8 @@ int zmq::curve_client_t::encode (msg_t *msg_) uint8_t flags = 0; if (msg_->flags () & msg_t::more) flags |= 0x01; + if (msg_->flags () & msg_t::command) + flags |= 0x02; uint8_t message_nonce [crypto_box_NONCEBYTES]; memcpy (message_nonce, "CurveZMQMESSAGEC", 16); @@ -223,6 +225,8 @@ int zmq::curve_client_t::decode (msg_t *msg_) const uint8_t flags = message_plaintext [crypto_box_ZEROBYTES]; if (flags & 0x01) msg_->set_flags (msg_t::more); + if (flags & 0x02) + msg_->set_flags (msg_t::command); memcpy (msg_->data (), message_plaintext + crypto_box_ZEROBYTES + 1, diff --git a/src/curve_server.cpp b/src/curve_server.cpp index e85b10b8..b47f5dfd 100644 --- a/src/curve_server.cpp +++ b/src/curve_server.cpp @@ -142,6 +142,8 @@ int zmq::curve_server_t::encode (msg_t *msg_) uint8_t flags = 0; if (msg_->flags () & msg_t::more) flags |= 0x01; + if (msg_->flags () & msg_t::command) + flags |= 0x02; uint8_t *message_plaintext = static_cast (malloc (mlen)); alloc_assert (message_plaintext); @@ -232,6 +234,8 @@ int zmq::curve_server_t::decode (msg_t *msg_) const uint8_t flags = message_plaintext [crypto_box_ZEROBYTES]; if (flags & 0x01) msg_->set_flags (msg_t::more); + if (flags & 0x02) + msg_->set_flags (msg_t::command); memcpy (msg_->data (), message_plaintext + crypto_box_ZEROBYTES + 1, diff --git a/src/gssapi_mechanism_base.cpp b/src/gssapi_mechanism_base.cpp index 355f1528..bdd18361 100644 --- a/src/gssapi_mechanism_base.cpp +++ b/src/gssapi_mechanism_base.cpp @@ -80,6 +80,8 @@ int zmq::gssapi_mechanism_base_t::encode_message (msg_t *msg_) uint8_t flags = 0; if (msg_->flags () & msg_t::more) flags |= 0x01; + if (msg ->flags () & msg_t::command) + flags |= 0x02; uint8_t *plaintext_buffer = static_cast (malloc(msg_->size ()+1)); plaintext_buffer[0] = flags; @@ -177,6 +179,8 @@ int zmq::gssapi_mechanism_base_t::decode_message (msg_t *msg_) const uint8_t flags = static_cast (plaintext.value)[0]; if (flags & 0x01) msg_->set_flags (msg_t::more); + if (flags & 0x02) + msg_->set_flags (msg_t::command); memcpy (msg_->data (), static_cast (plaintext.value)+1, plaintext.length-1); diff --git a/src/options.cpp b/src/options.cpp index 40116996..ebc35290 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -69,7 +69,10 @@ zmq::options_t::options_t () : socket_id (0), conflate (false), handshake_ivl (30000), - connected (false) + connected (false), + heartbeat_ttl (0), + heartbeat_interval (0), + heartbeat_timeout (0) { } @@ -519,6 +522,27 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, } break; + case ZMQ_HEARTBEAT_IVL: + if (is_int && value >= 0) { + heartbeat_interval = value; + return 0; + } + break; + + case ZMQ_HEARTBEAT_TTL: + if (is_int && value >= 0 && value < 0xffff) { + heartbeat_ttl = (uint16_t)value; + return 0; + } + break; + + case ZMQ_HEARTBEAT_TIMEOUT: + if (is_int && value >= 0) { + heartbeat_timeout = value; + return 0; + } + break; + default: #if defined (ZMQ_ACT_MILITANT) // There are valid scenarios for probing with unknown socket option @@ -872,6 +896,27 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) } break; + case ZMQ_HEARTBEAT_IVL: + if (is_int) { + *value = heartbeat_interval; + return 0; + } + break; + + case ZMQ_HEARTBEAT_TTL: + if (is_int) { + *(uint16_t*)value = heartbeat_ttl; + return 0; + } + break; + + case ZMQ_HEARTBEAT_TIMEOUT: + if (is_int) { + *value = heartbeat_timeout; + return 0; + } + break; + default: #if defined (ZMQ_ACT_MILITANT) malformed = false; diff --git a/src/options.hpp b/src/options.hpp index cb83616f..bdaea966 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -198,6 +198,15 @@ namespace zmq int handshake_ivl; bool connected; + // If remote peer receives a PING message and doesn't receive another + // message within the ttl value, it should close the connection + // (measured in tenths of a second) + uint16_t heartbeat_ttl; + // Time in milliseconds between sending heartbeat PING messages. + int heartbeat_interval; + // Time in milliseconds to wait for a PING response before disconnecting + int heartbeat_timeout; + }; } diff --git a/src/session_base.cpp b/src/session_base.cpp index 9b2bcf78..be425f20 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -137,6 +137,8 @@ int zmq::session_base_t::pull_msg (msg_t *msg_) int zmq::session_base_t::push_msg (msg_t *msg_) { + if(msg_->flags() & msg_t::command) + return 0; if (pipe && pipe->write (msg_)) { int rc = msg_->init (); errno_assert (rc == 0); diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 8c8eb8a4..6190395c 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -95,6 +95,9 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, input_stopped (false), output_stopped (false), has_handshake_timer (false), + has_ttl_timer (false), + has_timeout_timer (false), + has_heartbeat_timer (false), socket (NULL) { int rc = tx_msg.init (); @@ -250,6 +253,20 @@ void zmq::stream_engine_t::unplug () has_handshake_timer = false; } + if (has_ttl_timer) { + cancel_timer (heartbeat_ttl_timer_id); + has_ttl_timer = false; + } + + if (has_timeout_timer) { + cancel_timer (heartbeat_timeout_timer_id); + has_timeout_timer = false; + } + + if (has_heartbeat_timer) { + cancel_timer (heartbeat_ivl_timer_id); + has_heartbeat_timer = false; + } // Cancel all fd subscriptions. if (!io_error) rm_fd (handle); @@ -686,6 +703,11 @@ bool zmq::stream_engine_t::handshake () } next_msg = &stream_engine_t::next_handshake_command; process_msg = &stream_engine_t::process_handshake_command; + + if(options.heartbeat_interval > 0) { + add_timer(options.heartbeat_interval, heartbeat_ivl_timer_id); + has_heartbeat_timer = true; + } } // Start polling for output if necessary. @@ -883,6 +905,23 @@ int zmq::stream_engine_t::decode_and_push (msg_t *msg_) if (mechanism->decode (msg_) == -1) return -1; + + if(has_timeout_timer) { + has_timeout_timer = false; + cancel_timer(heartbeat_timeout_timer_id); + } + + if(has_ttl_timer) { + has_ttl_timer = false; + cancel_timer(heartbeat_ttl_timer_id); + } + + if(msg_->flags() & msg_t::command) { + uint8_t cmd_id = *((uint8_t*)msg_->data()); + if(cmd_id == 4) + process_heartbeat_message(msg_); + } + if (metadata) msg_->set_metadata (metadata); if (session->push_msg (msg_) == -1) { @@ -954,9 +993,86 @@ bool zmq::stream_engine_t::init_properties (properties_t & properties) { void zmq::stream_engine_t::timer_event (int id_) { - zmq_assert (id_ == handshake_timer_id); - has_handshake_timer = false; - - // handshake timer expired before handshake completed, so engine fails - error (timeout_error); + if(id_ == handshake_timer_id) { + has_handshake_timer = false; + // handshake timer expired before handshake completed, so engine fail + error (timeout_error); + } + else if(id_ == heartbeat_ivl_timer_id) { + next_msg = &stream_engine_t::produce_ping_message; + out_event(); + add_timer(options.heartbeat_interval, heartbeat_ivl_timer_id); + } + else if(id_ == heartbeat_ttl_timer_id) { + has_ttl_timer = false; + error(timeout_error); + } + else if(id_ == heartbeat_timeout_timer_id) { + has_timeout_timer = false; + error(timeout_error); + } + else + // There are no other valid timer ids! + assert(false); +} + +int zmq::stream_engine_t::produce_ping_message(msg_t * msg_) +{ + int rc = 0; + zmq_assert (mechanism != NULL); + + // 16-bit TTL + \4PING == 7 + msg_->init_size(7); + msg_->set_flags(msg_t::command); + // Copy in the command message + memcpy(msg_->data(), "\4PING", 5); + + uint16_t ttl_val = htons(options.heartbeat_ttl); + memcpy(((uint8_t*)msg_->data()) + 5, &ttl_val, sizeof(ttl_val)); + + rc = mechanism->encode (msg_); + next_msg = &stream_engine_t::pull_and_encode; + if(!has_timeout_timer && options.heartbeat_timeout > 0) { + add_timer(options.heartbeat_timeout, heartbeat_timeout_timer_id); + has_timeout_timer = true; + } + return rc; +} + +int zmq::stream_engine_t::produce_pong_message(msg_t * msg_) +{ + int rc = 0; + zmq_assert (mechanism != NULL); + + msg_->init_size(5); + msg_->set_flags(msg_t::command); + + memcpy(msg_->data(), "\4PONG", 5); + + rc = mechanism->encode (msg_); + next_msg = &stream_engine_t::pull_and_encode; + return rc; +} + +int zmq::stream_engine_t::process_heartbeat_message(msg_t * msg_) +{ + if(memcmp(msg_->data(), "\4PING", 5) == 0) { + uint16_t remote_heartbeat_ttl; + // Get the remote heartbeat TTL to setup the timer + memcpy(&remote_heartbeat_ttl, (uint8_t*)msg_->data() + 5, 2); + remote_heartbeat_ttl = ntohs(remote_heartbeat_ttl); + // The remote heartbeat is in 10ths of a second + // so we multiply it by 10 to get the timer interval. + remote_heartbeat_ttl *= 10; + + if(!has_ttl_timer && remote_heartbeat_ttl > 0) { + add_timer(remote_heartbeat_ttl, heartbeat_ttl_timer_id); + has_ttl_timer = true; + } + + next_msg = &stream_engine_t::produce_pong_message; + out_event(); + } + + return 0; } diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index fad77f57..5d661d89 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -127,6 +127,10 @@ namespace zmq typedef metadata_t::dict_t properties_t; bool init_properties (properties_t & properties); + int produce_ping_message(msg_t * msg_); + int process_heartbeat_message(msg_t * msg_); + int produce_pong_message(msg_t * msg_); + // Underlying socket. fd_t s; @@ -206,6 +210,16 @@ namespace zmq // True is linger timer is running. bool has_handshake_timer; + // Heartbeat stuff + enum { + heartbeat_ivl_timer_id = 0x80, + heartbeat_timeout_timer_id = 0x81, + heartbeat_ttl_timer_id = 0x82 + }; + bool has_ttl_timer; + bool has_timeout_timer; + bool has_heartbeat_timer; + // Socket zmq::socket_base_t *socket; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0086b651..8256cdbc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -49,6 +49,7 @@ set(tests test_thread_safe test_client_server test_sockopt_hwm + test_heartbeats ) if(NOT WIN32) list(APPEND tests diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp new file mode 100644 index 00000000..7bfbc7d9 --- /dev/null +++ b/tests/test_heartbeats.cpp @@ -0,0 +1,329 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" +#if defined (ZMQ_HAVE_WINDOWS) +# include +# include +# include +# define close closesocket +#else +# include +# include +# include +# include +#endif + +// Read one event off the monitor socket; return value and address +// by reference, if not null, and event number by value. Returns -1 +// in case of error. + +static int +get_monitor_event (void *monitor) +{ + for(int i = 0; i < 2; i++) { + // First frame in message contains event number and value + zmq_msg_t msg; + zmq_msg_init (&msg); + if (zmq_msg_recv (&msg, monitor, ZMQ_DONTWAIT) == -1) { + msleep(150); + continue; // Interruped, presumably + } + assert (zmq_msg_more (&msg)); + + uint8_t *data = (uint8_t *) zmq_msg_data (&msg); + uint16_t event = *(uint16_t *) (data); + + // Second frame in message contains event address + zmq_msg_init (&msg); + if (zmq_msg_recv (&msg, monitor, 0) == -1) { + return -1; // Interruped, presumably + } + assert (!zmq_msg_more (&msg)); + + return event; + } + return -1; +} + +static void +mock_handshake (int fd) { + const uint8_t zmtp_greeting[33] = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0x7f, 3, 0, 'N', 'U', 'L', 'L', 0 }; + char buffer[128]; + memset(buffer, 0, sizeof(buffer)); + memcpy(buffer, zmtp_greeting, sizeof(zmtp_greeting)); + + int rc = send(fd, buffer, 64, 0); + assert(rc == 64); + + rc = recv(fd, buffer, 64, 0); + assert(rc == 64); + + const uint8_t zmtp_ready[43] = { + 4, 41, 5, 'R', 'E', 'A', 'D', 'Y', 11, 'S', 'o', 'c', 'k', 'e', 't', '-', 'T', 'y', 'p', 'e', + 0, 0, 0, 6, 'D', 'E', 'A', 'L', 'E', 'R', 8, 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', + 0, 0, 0, 0 + }; + + memset(buffer, 0, sizeof(buffer)); + memcpy(buffer, zmtp_ready, 43); + rc = send(fd, buffer, 43, 0); + assert(rc == 43); + + rc = recv(fd, buffer, 43, 0); + assert(rc == 43); +} + +static void +setup_curve(void * socket, int is_server) { + const char *secret_key; + const char *public_key; + const char *server_key; + + if(is_server) { + secret_key = "JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6"; + public_key = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7"; + server_key = NULL; + } + else { + secret_key = "D:)Q[IlAW!ahhC2ac:9*A}h:p?([4%wOTJ%JR%cs"; + public_key = "Yne@$w-vo -1); + + // Mock a ZMTP 3 client so we can forcibly time out a connection + mock_handshake(s); + + // By now everything should report as connected + rc = get_monitor_event(server_mon); + assert(rc == ZMQ_EVENT_ACCEPTED); + + // We should have been disconnected + rc = get_monitor_event(server_mon); + assert(rc == ZMQ_EVENT_DISCONNECTED); + + close(s); + + rc = zmq_close (server); + assert (rc == 0); + + rc = zmq_close (server_mon); + assert (rc == 0); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); +} + +// This checks that peers respect the TTL value in ping messages +// We set up a mock ZMTP 3 client and send a ping message with a TLL +// to a server that is not doing any heartbeating. Then we sleep, +// if the server disconnects the client, then we know the TTL did +// its thing correctly. +static void +test_heartbeat_ttl (void) +{ + int rc; + + // Set up our context and sockets + void *ctx = zmq_ctx_new (); + assert (ctx); + + void * server, * server_mon; + prep_server_socket(ctx, 0, 0, &server, &server_mon); + + struct sockaddr_in ip4addr; + int s; + + ip4addr.sin_family = AF_INET; + ip4addr.sin_port = htons(5556); + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); + + s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); + rc = connect (s, (struct sockaddr*) &ip4addr, sizeof ip4addr); + assert (rc > -1); + + // Mock a ZMTP 3 client so we can forcibly time out a connection + mock_handshake(s); + + // By now everything should report as connected + rc = get_monitor_event(server_mon); + assert(rc == ZMQ_EVENT_ACCEPTED); + + // This is a ping message with a 0.5 second TTL. + uint8_t ping_message[] = { + 0x4, // This specifies that this is a command message + 0x7, // The total payload length is 8 bytes + 0x4, 'P', 'I', 'N', 'G', // The command name + 0, 10 // This is a network-order 16-bit TTL value + }; + rc = send(s, ping_message, sizeof(ping_message), 0); + assert(rc == sizeof(ping_message)); + + uint8_t pong_buffer[8] = { 0 }; + rc = recv(s, pong_buffer, 7, 0); + assert(rc == 7 && memcmp(pong_buffer, "\4\5\4PONG", 7) == 0); + + // We should have been disconnected + rc = get_monitor_event(server_mon); + assert(rc == ZMQ_EVENT_DISCONNECTED); + + close(s); + + rc = zmq_close (server); + assert (rc == 0); + + rc = zmq_close (server_mon); + assert (rc == 0); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); +} + +// This checks for normal operation - that is pings and pongs being +// exchanged normally. There should be an accepted event on the server, +// and then no event afterwards. +static void +test_heartbeat_notimeout (int is_curve) +{ + int rc; + + // Set up our context and sockets + void *ctx = zmq_ctx_new (); + assert (ctx); + + void * server, * server_mon; + prep_server_socket(ctx, 1, is_curve, &server, &server_mon); + + void * client = zmq_socket(ctx, ZMQ_DEALER); + if(is_curve) + setup_curve(client, 0); + rc = zmq_connect(client, "tcp://127.0.0.1:5556"); + + // Give it a sec to connect and handshake + msleep(100); + + // By now everything should report as connected + rc = get_monitor_event(server_mon); + assert(rc == ZMQ_EVENT_ACCEPTED); + + // We should still be connected because pings and pongs are happenin' + rc = get_monitor_event(server_mon); + assert(rc == -1); + + rc = zmq_close (client); + assert (rc == 0); + + rc = zmq_close (server); + assert (rc == 0); + + rc = zmq_close (server_mon); + assert (rc == 0); + + rc = zmq_ctx_term (ctx); + assert (rc == 0); +} + +int main (void) +{ + setup_test_environment(); + test_heartbeat_timeout(); + test_heartbeat_ttl(); + // Run this test without curve + test_heartbeat_notimeout(0); + // Then rerun it with curve + test_heartbeat_notimeout(1); +} From df0c7076bd50641a0e0787f7a707b3a2a9fc3543 Mon Sep 17 00:00:00 2001 From: Jonathan Reams Date: Wed, 24 Jun 2015 14:28:36 -0400 Subject: [PATCH 057/108] Fix test_heartbeats compile in VS2013 --- tests/test_heartbeats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp index 7bfbc7d9..0264a8c1 100644 --- a/tests/test_heartbeats.cpp +++ b/tests/test_heartbeats.cpp @@ -250,11 +250,11 @@ test_heartbeat_ttl (void) 0x4, 'P', 'I', 'N', 'G', // The command name 0, 10 // This is a network-order 16-bit TTL value }; - rc = send(s, ping_message, sizeof(ping_message), 0); + rc = send(s, (const char*)ping_message, sizeof(ping_message), 0); assert(rc == sizeof(ping_message)); uint8_t pong_buffer[8] = { 0 }; - rc = recv(s, pong_buffer, 7, 0); + rc = recv(s, (char*)pong_buffer, 7, 0); assert(rc == 7 && memcmp(pong_buffer, "\4\5\4PONG", 7) == 0); // We should have been disconnected From 85417ba2fcae69ad3c247ff481965fafc193a63f Mon Sep 17 00:00:00 2001 From: Jonathan Reams Date: Wed, 24 Jun 2015 15:02:53 -0400 Subject: [PATCH 058/108] Add documentation for ZMTP heartbeat socket options --- doc/zmq_setsockopt.txt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index e70d5a3b..8728472f 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -246,6 +246,45 @@ Option value unit:: milliseconds Default value:: 30000 Applicable socket types:: all but ZMQ_STREAM, only for connection-oriented transports +ZMQ_HEARTBEAT_IVL: Set interval between sending ZMTP heartbeats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_HEARTBEAT_IVL' option shall set the interval between sending ZMTP heartbeats +for the specified 'socket'. If this option is set and is greater than 0, then a 'PING' +ZMTP command will be sent every 'ZMQ_HEARTBEAT_IVL' milliseconds. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: 0 +Applicable socket types:: all, when using connection-oriented transports + +ZMQ_HEARTBEAT_TIMEOUT: Set timeout for ZMTP heartbeats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_HEARTBEAT_TIMEOUT' option shall set how long to wait before timing-out a +connection after sending a 'PING' ZMTP command and not receiving any traffic. This +option is only valid if 'ZMQ_HEARTBEAT_IVL' is also set, and is greater than 0. The +connection will time out if there is no traffic received after sending the 'PING' +command, but the received traffic does not have to be a 'PONG' command - any received +traffic will cancel the timeout. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: 0 +Applicable socket types:: all, when using connection-oriented transports + +ZMQ_HEARTBEAT_TTL: Set the TTL value for ZMTP heartbeats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_HEARTBEAT_TTL' option shall set the timeout on the remote peer for ZMTP +heartbeats. If this option is greater than 0, the remote side shall time out the +connection if it does not receive any more traffic within the TTL period. This option +does not have any effect if 'ZMQ_HEARTBEAT_IVL' is not set or is 0. + +[horizontal] +Option value type:: uint16_t +Option value unit:: deciseconds (1/10th of a second) +Default value:: 0 +Applicable socket types:: all, when using connection-oriented transports ZMQ_IDENTITY: Set socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e9a5bc8d1e6a78caf2117caea2bdc6ab8e8abee1 Mon Sep 17 00:00:00 2001 From: Jonathan Reams Date: Fri, 26 Jun 2015 14:08:08 -0400 Subject: [PATCH 059/108] Fix units and default values for heartbeats options Set the ZMQ_HEARTBEAT_TIMEOUT to default to the value of ZMQ_HEARTBEAT_IVL if it's not explicitly set. Change the units of ZMQ_HEARTBEAT_TTL to milliseconds in the API and round down to the nearest decisecond so that all the options are using the same units. Make the maximum heartbeat TTL match the spec (6553 seconds) --- doc/zmq_setsockopt.txt | 8 ++++--- src/options.cpp | 9 +++++--- src/stream_engine.cpp | 14 ++++++++---- src/stream_engine.hpp | 1 + tests/test_heartbeats.cpp | 48 ++++++++++++++------------------------- 5 files changed, 39 insertions(+), 41 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 8728472f..3a8c83bb 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -278,11 +278,13 @@ ZMQ_HEARTBEAT_TTL: Set the TTL value for ZMTP heartbeats The 'ZMQ_HEARTBEAT_TTL' option shall set the timeout on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option -does not have any effect if 'ZMQ_HEARTBEAT_IVL' is not set or is 0. +does not have any effect if 'ZMQ_HEARTBEAT_IVL' is not set or is 0. Internally, this +value is rounded down to the nearest decisecond, any value less than 100 will have +no effect. [horizontal] -Option value type:: uint16_t -Option value unit:: deciseconds (1/10th of a second) +Option value type:: int +Option value unit:: milliseconds Default value:: 0 Applicable socket types:: all, when using connection-oriented transports diff --git a/src/options.cpp b/src/options.cpp index ebc35290..6742f92e 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -72,7 +72,7 @@ zmq::options_t::options_t () : connected (false), heartbeat_ttl (0), heartbeat_interval (0), - heartbeat_timeout (0) + heartbeat_timeout (-1) { } @@ -530,7 +530,9 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, break; case ZMQ_HEARTBEAT_TTL: - if (is_int && value >= 0 && value < 0xffff) { + // Convert this to deciseconds from milliseconds + value = value / 100; + if (is_int && value >= 0 && value <= 6553) { heartbeat_ttl = (uint16_t)value; return 0; } @@ -905,7 +907,8 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) case ZMQ_HEARTBEAT_TTL: if (is_int) { - *(uint16_t*)value = heartbeat_ttl; + // Convert the internal deciseconds value to milliseconds + *value = heartbeat_ttl * 100; return 0; } break; diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 6190395c..96b6bde6 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -98,6 +98,7 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, has_ttl_timer (false), has_timeout_timer (false), has_heartbeat_timer (false), + heartbeat_timeout (0), socket (NULL) { int rc = tx_msg.init (); @@ -144,6 +145,11 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int)); errno_assert (rc == 0); #endif + if(options.heartbeat_interval > 0) { + heartbeat_timeout = options.heartbeat_timeout; + if(heartbeat_timeout == -1) + heartbeat_timeout = options.heartbeat_interval; + } } zmq::stream_engine_t::~stream_engine_t () @@ -1032,8 +1038,8 @@ int zmq::stream_engine_t::produce_ping_message(msg_t * msg_) rc = mechanism->encode (msg_); next_msg = &stream_engine_t::pull_and_encode; - if(!has_timeout_timer && options.heartbeat_timeout > 0) { - add_timer(options.heartbeat_timeout, heartbeat_timeout_timer_id); + if(!has_timeout_timer && heartbeat_timeout > 0) { + add_timer(heartbeat_timeout, heartbeat_timeout_timer_id); has_timeout_timer = true; } return rc; @@ -1062,8 +1068,8 @@ int zmq::stream_engine_t::process_heartbeat_message(msg_t * msg_) memcpy(&remote_heartbeat_ttl, (uint8_t*)msg_->data() + 5, 2); remote_heartbeat_ttl = ntohs(remote_heartbeat_ttl); // The remote heartbeat is in 10ths of a second - // so we multiply it by 10 to get the timer interval. - remote_heartbeat_ttl *= 10; + // so we multiply it by 100 to get the timer interval in ms. + remote_heartbeat_ttl *= 100; if(!has_ttl_timer && remote_heartbeat_ttl > 0) { add_timer(remote_heartbeat_ttl, heartbeat_ttl_timer_id); diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index 5d661d89..61cc3838 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -219,6 +219,7 @@ namespace zmq bool has_ttl_timer; bool has_timeout_timer; bool has_heartbeat_timer; + int heartbeat_timeout; // Socket zmq::socket_base_t *socket; diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp index 0264a8c1..c5aa060b 100644 --- a/tests/test_heartbeats.cpp +++ b/tests/test_heartbeats.cpp @@ -131,10 +131,6 @@ prep_server_socket(void * ctx, int set_heartbeats, int is_curve, void ** server_ value = 50; rc = zmq_setsockopt (server, ZMQ_HEARTBEAT_IVL, &value, sizeof(value)); assert (rc == 0); - - value = 50; - rc = zmq_setsockopt (server, ZMQ_HEARTBEAT_TIMEOUT, &value, sizeof(value)); - assert (rc == 0); } if(is_curve) @@ -216,59 +212,49 @@ test_heartbeat_timeout (void) static void test_heartbeat_ttl (void) { - int rc; + int rc, value; // Set up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); - void * server, * server_mon; + void * server, * server_mon, *client; prep_server_socket(ctx, 0, 0, &server, &server_mon); - struct sockaddr_in ip4addr; - int s; + client = zmq_socket(ctx, ZMQ_DEALER); + assert(client != NULL); - ip4addr.sin_family = AF_INET; - ip4addr.sin_port = htons(5556); - inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); + // Set the heartbeat TTL to 0.1 seconds + value = 100; + zmq_setsockopt(client, ZMQ_HEARTBEAT_TTL, &value, sizeof(value)); - s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); - rc = connect (s, (struct sockaddr*) &ip4addr, sizeof ip4addr); - assert (rc > -1); + // Set the heartbeat interval to much longer than the TTL so that + // the socket times out oon the remote side. + value = 250; + zmq_setsockopt(client, ZMQ_HEARTBEAT_IVL, &value, sizeof(value)); - // Mock a ZMTP 3 client so we can forcibly time out a connection - mock_handshake(s); + rc = zmq_connect(client, "tcp://localhost:5556"); + assert(rc == 0); // By now everything should report as connected rc = get_monitor_event(server_mon); assert(rc == ZMQ_EVENT_ACCEPTED); - // This is a ping message with a 0.5 second TTL. - uint8_t ping_message[] = { - 0x4, // This specifies that this is a command message - 0x7, // The total payload length is 8 bytes - 0x4, 'P', 'I', 'N', 'G', // The command name - 0, 10 // This is a network-order 16-bit TTL value - }; - rc = send(s, (const char*)ping_message, sizeof(ping_message), 0); - assert(rc == sizeof(ping_message)); - - uint8_t pong_buffer[8] = { 0 }; - rc = recv(s, (char*)pong_buffer, 7, 0); - assert(rc == 7 && memcmp(pong_buffer, "\4\5\4PONG", 7) == 0); + msleep(100); // We should have been disconnected rc = get_monitor_event(server_mon); assert(rc == ZMQ_EVENT_DISCONNECTED); - close(s); - rc = zmq_close (server); assert (rc == 0); rc = zmq_close (server_mon); assert (rc == 0); + rc = zmq_close (client); + assert (rc == 0); + rc = zmq_ctx_term (ctx); assert (rc == 0); } From 34129593f0d9fe2511231ba07f86c58e377ac6e7 Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Sun, 28 Jun 2015 21:13:02 -0500 Subject: [PATCH 060/108] update gitignore with additional tests --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index a5d4fc07..9c2362ac 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ autom4te.cache *~ .*~ curve_keygen +test_heartbeats +test_msg_ffn +test_socketopt_hwm test_resource test_ipc_wildcard test_stream_empty @@ -74,6 +77,7 @@ test_linger test_security_null test_security_plain test_proxy +test_proxy_single_socket test_proxy_terminate test_abstract_ipc test_filter_ipc From a9fd750e1ca559c2db4ee18b25be42a692c382ed Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Sun, 28 Jun 2015 21:23:25 -0500 Subject: [PATCH 061/108] add tests for #949 --- Makefile.am | 8 ++++++ tests/CMakeLists.txt | 2 ++ tests/test_unbind_inproc.cpp | 40 ++++++++++++++++++++++++++++++ tests/test_unbind_wildcard.cpp | 45 ++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 tests/test_unbind_inproc.cpp create mode 100644 tests/test_unbind_wildcard.cpp diff --git a/Makefile.am b/Makefile.am index 8ceba66c..86b1b4bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -324,6 +324,8 @@ test_apps = \ tests/test_stream_disconnect \ tests/test_stream_timeout \ tests/test_disconnect_inproc \ + tests/test_unbind_inproc \ + tests/test_unbind_wildcard \ tests/test_ctx_options \ tests/test_ctx_destroy \ tests/test_security_null \ @@ -450,6 +452,12 @@ tests_test_stream_disconnect_LDADD = src/libzmq.la tests_test_disconnect_inproc_SOURCES = tests/test_disconnect_inproc.cpp tests_test_disconnect_inproc_LDADD = src/libzmq.la +tests_test_unbind_inproc_SOURCES = tests/test_unbind_inproc.cpp +tests_test_unbind_inproc_LDADD = src/libzmq.la + +tests_test_unbind_wildcard_SOURCES = tests/test_unbind_wildcard.cpp +tests_test_unbind_wildcard_LDADD = src/libzmq.la + tests_test_ctx_options_SOURCES = tests/test_ctx_options.cpp tests_test_ctx_options_LDADD = src/libzmq.la diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8256cdbc..f5f95dee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -23,6 +23,8 @@ set(tests test_stream_empty test_stream_disconnect test_disconnect_inproc + test_unbind_inproc + test_unbind_wildcard test_ctx_options test_ctx_destroy test_security_null diff --git a/tests/test_unbind_inproc.cpp b/tests/test_unbind_inproc.cpp new file mode 100644 index 00000000..73059175 --- /dev/null +++ b/tests/test_unbind_inproc.cpp @@ -0,0 +1,40 @@ +/* + Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" + +int main (void) +{ + setup_test_environment(); + void *ctx = zmq_ctx_new (); + assert (ctx); + + void *sb = zmq_socket (ctx, ZMQ_REP); + assert (sb); + int rc = zmq_bind (sb, "inproc://a"); + assert (rc == 0); + + rc = zmq_unbind (sb, "inproc://a"); + assert (rc == 0); + + // rc = zmq_ctx_term (ctx); + // assert (rc == 0); + + return 0; +} diff --git a/tests/test_unbind_wildcard.cpp b/tests/test_unbind_wildcard.cpp new file mode 100644 index 00000000..40402460 --- /dev/null +++ b/tests/test_unbind_wildcard.cpp @@ -0,0 +1,45 @@ +/* + Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "testutil.hpp" + +int main (void) +{ + setup_test_environment(); + void *ctx = zmq_ctx_new (); + assert (ctx); + + void *sb = zmq_socket (ctx, ZMQ_REP); + assert (sb); + int rc = zmq_bind (sb, "tcp://*:5555"); + assert (rc == 0); + + char endpoint[256]; + size_t endpoint_len = sizeof (endpoint); + rc = zmq_getsockopt (sb, ZMQ_LAST_ENDPOINT, endpoint, &endpoint_len); + assert (rc == 0); + + rc = zmq_unbind (sb, endpoint); + assert (rc == 0); + + // rc = zmq_ctx_term (ctx); + // assert (rc == 0); + + return 0; +} From 6dac5092ad7cc6b38c049fdc1f0b52fd0ef4a9d8 Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Sun, 28 Jun 2015 21:27:06 -0500 Subject: [PATCH 062/108] fix errant comments --- tests/test_unbind_inproc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_unbind_inproc.cpp b/tests/test_unbind_inproc.cpp index 73059175..104d8cb3 100644 --- a/tests/test_unbind_inproc.cpp +++ b/tests/test_unbind_inproc.cpp @@ -33,8 +33,8 @@ int main (void) rc = zmq_unbind (sb, "inproc://a"); assert (rc == 0); - // rc = zmq_ctx_term (ctx); - // assert (rc == 0); + rc = zmq_ctx_term (ctx); + assert (rc == 0); return 0; } From d14f419743a3ad8bee03255f6e115488c4ee455a Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Sun, 28 Jun 2015 21:29:23 -0500 Subject: [PATCH 063/108] another errant comment --- tests/test_unbind_wildcard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_unbind_wildcard.cpp b/tests/test_unbind_wildcard.cpp index 40402460..1a4e72a0 100644 --- a/tests/test_unbind_wildcard.cpp +++ b/tests/test_unbind_wildcard.cpp @@ -38,8 +38,8 @@ int main (void) rc = zmq_unbind (sb, endpoint); assert (rc == 0); - // rc = zmq_ctx_term (ctx); - // assert (rc == 0); + rc = zmq_ctx_term (ctx); + assert (rc == 0); return 0; } From 0f208c122dafb32cab665f7db8444b0af1aa0f77 Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Sun, 28 Jun 2015 22:32:15 -0500 Subject: [PATCH 064/108] be pedantic and call zmq_close in tests --- tests/test_unbind_inproc.cpp | 3 +++ tests/test_unbind_wildcard.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/test_unbind_inproc.cpp b/tests/test_unbind_inproc.cpp index 104d8cb3..2b1d8982 100644 --- a/tests/test_unbind_inproc.cpp +++ b/tests/test_unbind_inproc.cpp @@ -33,6 +33,9 @@ int main (void) rc = zmq_unbind (sb, "inproc://a"); assert (rc == 0); + rc = zmq_close (sb); + assert (rc == 0); + rc = zmq_ctx_term (ctx); assert (rc == 0); diff --git a/tests/test_unbind_wildcard.cpp b/tests/test_unbind_wildcard.cpp index 1a4e72a0..dae1d423 100644 --- a/tests/test_unbind_wildcard.cpp +++ b/tests/test_unbind_wildcard.cpp @@ -38,6 +38,9 @@ int main (void) rc = zmq_unbind (sb, endpoint); assert (rc == 0); + rc = zmq_close (sb); + assert (rc == 0); + rc = zmq_ctx_term (ctx); assert (rc == 0); From ee787664bbc5890360063baf5776cd3b2b01354a Mon Sep 17 00:00:00 2001 From: Dylan Cali Date: Mon, 29 Jun 2015 03:19:24 -0500 Subject: [PATCH 065/108] ignore unbind tests --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9c2362ac..42561993 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,8 @@ test_immediate test_term_endpoint test_router_mandatory test_disconnect_inproc +test_unbind_inproc +test_unbind_wildcard test_raw_sock test_disconnect_inproc test_ctx_options From 68f5926ec65d33043ba3f1687e49d1e6abe47fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 30 Jun 2015 20:48:29 +0100 Subject: [PATCH 066/108] Add support for in C++11 --- src/atomic_ptr.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index 14bc3741..846a292e 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -36,6 +36,8 @@ #define ZMQ_ATOMIC_PTR_MUTEX #elif defined ZMQ_HAVE_ATOMIC_INTRINSICS #define ZMQ_ATOMIC_PTR_INTRINSIC +#elif (defined ZMQ_CXX11 && defined __cplusplus && __cplusplus >= 201103L) +#define ZMQ_ATOMIC_CXX11 #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_PTR_X86 #elif defined __ARM_ARCH_7A__ && defined __GNUC__ @@ -52,6 +54,8 @@ #if defined ZMQ_ATOMIC_PTR_MUTEX #include "mutex.hpp" +#elif defined ZMQ_ATOMIC_CXX11 +#include #elif defined ZMQ_ATOMIC_PTR_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H @@ -96,6 +100,8 @@ namespace zmq return (T*) InterlockedExchangePointer ((PVOID*) &ptr, val_); #elif defined ZMQ_ATOMIC_PTR_INTRINSIC return (T*) __atomic_exchange_n (&ptr, val_, __ATOMIC_ACQ_REL); +#elif defined ZMQ_ATOMIC_CXX11 + return ptr.exchange(val_, std::memory_order_acq_rel); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_swap_ptr (&ptr, val_); #elif defined ZMQ_ATOMIC_PTR_TILE @@ -146,6 +152,9 @@ namespace zmq __atomic_compare_exchange_n (&ptr, (volatile T**) &old, val_, false, __ATOMIC_RELEASE, __ATOMIC_ACQUIRE); return old; +#elif defined ZMQ_ATOMIC_CXX11 + ptr.compare_exchange_strong(cmp_, val_); + return cmp_; #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_cas_ptr (&ptr, cmp_, val_); #elif defined ZMQ_ATOMIC_PTR_TILE @@ -189,13 +198,20 @@ namespace zmq private: +#if defined ZMQ_ATOMIC_CXX11 + std::atomic ptr; +#else volatile T *ptr; +#endif + #if defined ZMQ_ATOMIC_PTR_MUTEX mutex_t sync; #endif +#if ! defined ZMQ_ATOMIC_CXX11 atomic_ptr_t (const atomic_ptr_t&); const atomic_ptr_t &operator = (const atomic_ptr_t&); +#endif }; } From 08f9bf589e4d5f157bb5072a6242f38aff403d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 30 Jun 2015 22:26:35 +0100 Subject: [PATCH 067/108] Add missing relaxed memory ordering. --- src/atomic_ptr.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index 846a292e..04be3349 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -153,7 +153,7 @@ namespace zmq __ATOMIC_RELEASE, __ATOMIC_ACQUIRE); return old; #elif defined ZMQ_ATOMIC_CXX11 - ptr.compare_exchange_strong(cmp_, val_); + ptr.compare_exchange_strong(cmp_, val_, std::memory_order_acq_rel); return cmp_; #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_cas_ptr (&ptr, cmp_, val_); From 73e6a3808fd5063c6f09cfaf5a7334cee1c6712e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 30 Jun 2015 22:56:58 +0100 Subject: [PATCH 068/108] atomic_ptr.h: clean up the clean-up --- src/atomic_ptr.hpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index 04be3349..da2d1eb2 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -217,21 +217,13 @@ namespace zmq } // Remove macros local to this file. -#if defined ZMQ_ATOMIC_PTR_WINDOWS -#undef ZMQ_ATOMIC_PTR_WINDOWS -#endif -#if defined ZMQ_ATOMIC_PTR_ATOMIC_H -#undef ZMQ_ATOMIC_PTR_ATOMIC_H -#endif -#if defined ZMQ_ATOMIC_PTR_X86 -#undef ZMQ_ATOMIC_PTR_X86 -#endif -#if defined ZMQ_ATOMIC_PTR_ARM -#undef ZMQ_ATOMIC_PTR_ARM -#endif -#if defined ZMQ_ATOMIC_PTR_MUTEX #undef ZMQ_ATOMIC_PTR_MUTEX -#endif +#undef ZMQ_ATOMIC_PTR_INTRINSIC +#undef ZMQ_ATOMIC_CXX11 +#undef ZMQ_ATOMIC_PTR_X86 +#undef ZMQ_ATOMIC_PTR_ARM +#undef ZMQ_ATOMIC_PTR_TILE +#undef ZMQ_ATOMIC_PTR_WINDOWS +#undef ZMQ_ATOMIC_PTR_ATOMIC_H #endif - From 26e3873f708ab30ae0580c0a6b6b81345fc5f7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 1 Jul 2015 09:55:25 +0100 Subject: [PATCH 069/108] Add C++11 support to atomic_counter_t. --- src/atomic_counter.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index bceb8347..7c55d0b8 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -37,6 +37,8 @@ #define ZMQ_ATOMIC_COUNTER_MUTEX #elif defined ZMQ_HAVE_ATOMIC_INTRINSICS #define ZMQ_ATOMIC_INTRINSIC +#elif (defined ZMQ_CXX11 && defined __cplusplus && __cplusplus >= 201103L) +#define ZMQ_ATOMIC_COUNTER_CXX11 #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_COUNTER_X86 #elif defined __ARM_ARCH_7A__ && defined __GNUC__ @@ -53,6 +55,8 @@ #if defined ZMQ_ATOMIC_COUNTER_MUTEX #include "mutex.hpp" +#elif defined ZMQ_ATOMIC_COUNTER_CXX11 +#include #elif defined ZMQ_ATOMIC_COUNTER_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H @@ -97,6 +101,8 @@ namespace zmq old_value = InterlockedExchangeAdd ((LONG*) &value, increment_); #elif defined ZMQ_ATOMIC_INTRINSIC old_value = __atomic_fetch_add(&value, increment_, __ATOMIC_ACQ_REL); +#elif defined ZMQ_ATOMIC_COUNTER_CXX11 + old_value = value.fetch_add(increment_, std::memory_order_acq_rel); #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H integer_t new_value = atomic_add_32_nv (&value, increment_); old_value = new_value - increment_; @@ -142,6 +148,9 @@ namespace zmq #elif defined ZMQ_ATOMIC_INTRINSIC integer_t nv = __atomic_sub_fetch(&value, decrement, __ATOMIC_ACQ_REL); return nv != 0; +#elif defined ZMQ_ATOMIC_COUNTER_CXX11 + integer_t old = value.fetch_sub(decrement, std::memory_order_acq_rel); + return old - decrement != 0; #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H int32_t delta = - ((int32_t) decrement); integer_t nv = atomic_add_32_nv (&value, delta); @@ -190,13 +199,20 @@ namespace zmq private: +#if defined ZMQ_ATOMIC_COUNTER_CXX11 + std::atomic value; +#else volatile integer_t value; +#endif + #if defined ZMQ_ATOMIC_COUNTER_MUTEX mutex_t sync; #endif +#if ! defined ZMQ_ATOMIC_COUNTER_CXX11 atomic_counter_t (const atomic_counter_t&); const atomic_counter_t& operator = (const atomic_counter_t&); +#endif }; } From ddb82a546b8786b23b977087000e296589529cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 1 Jul 2015 09:55:43 +0100 Subject: [PATCH 070/108] atomic_counter.hpp: clean up the clean-up --- src/atomic_counter.hpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index 7c55d0b8..a382fcc0 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -218,21 +218,13 @@ namespace zmq } // Remove macros local to this file. -#if defined ZMQ_ATOMIC_COUNTER_WINDOWS -#undef ZMQ_ATOMIC_COUNTER_WINDOWS -#endif -#if defined ZMQ_ATOMIC_COUNTER_ATOMIC_H -#undef ZMQ_ATOMIC_COUNTER_ATOMIC_H -#endif -#if defined ZMQ_ATOMIC_COUNTER_X86 -#undef ZMQ_ATOMIC_COUNTER_X86 -#endif -#if defined ZMQ_ATOMIC_COUNTER_ARM -#undef ZMQ_ATOMIC_COUNTER_ARM -#endif -#if defined ZMQ_ATOMIC_COUNTER_MUTEX #undef ZMQ_ATOMIC_COUNTER_MUTEX -#endif +#undef ZMQ_ATOMIC_INTRINSIC +#undef ZMQ_ATOMIC_COUNTER_CXX11 +#undef ZMQ_ATOMIC_COUNTER_X86 +#undef ZMQ_ATOMIC_COUNTER_ARM +#undef ZMQ_ATOMIC_COUNTER_WINDOWS +#undef ZMQ_ATOMIC_COUNTER_ATOMIC_H +#undef ZMQ_ATOMIC_COUNTER_TILE #endif - From 14d69a312db3b1b6082b7f31934877ca8e09993d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 2 Jul 2015 17:41:09 +0100 Subject: [PATCH 071/108] Clean-up: Rename internal macros consistently. --- src/atomic_counter.hpp | 8 ++++---- src/atomic_ptr.hpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index a382fcc0..457bd20e 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -36,7 +36,7 @@ #if defined ZMQ_FORCE_MUTEXES #define ZMQ_ATOMIC_COUNTER_MUTEX #elif defined ZMQ_HAVE_ATOMIC_INTRINSICS -#define ZMQ_ATOMIC_INTRINSIC +#define ZMQ_ATOMIC_COUNTER_INTRINSIC #elif (defined ZMQ_CXX11 && defined __cplusplus && __cplusplus >= 201103L) #define ZMQ_ATOMIC_COUNTER_CXX11 #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ @@ -99,7 +99,7 @@ namespace zmq #if defined ZMQ_ATOMIC_COUNTER_WINDOWS old_value = InterlockedExchangeAdd ((LONG*) &value, increment_); -#elif defined ZMQ_ATOMIC_INTRINSIC +#elif defined ZMQ_ATOMIC_COUNTER_INTRINSIC old_value = __atomic_fetch_add(&value, increment_, __ATOMIC_ACQ_REL); #elif defined ZMQ_ATOMIC_COUNTER_CXX11 old_value = value.fetch_add(increment_, std::memory_order_acq_rel); @@ -145,7 +145,7 @@ namespace zmq LONG delta = - ((LONG) decrement); integer_t old = InterlockedExchangeAdd ((LONG*) &value, delta); return old - decrement != 0; -#elif defined ZMQ_ATOMIC_INTRINSIC +#elif defined ZMQ_ATOMIC_COUNTER_INTRINSIC integer_t nv = __atomic_sub_fetch(&value, decrement, __ATOMIC_ACQ_REL); return nv != 0; #elif defined ZMQ_ATOMIC_COUNTER_CXX11 @@ -219,7 +219,7 @@ namespace zmq // Remove macros local to this file. #undef ZMQ_ATOMIC_COUNTER_MUTEX -#undef ZMQ_ATOMIC_INTRINSIC +#undef ZMQ_ATOMIC_COUNTER_INTRINSIC #undef ZMQ_ATOMIC_COUNTER_CXX11 #undef ZMQ_ATOMIC_COUNTER_X86 #undef ZMQ_ATOMIC_COUNTER_ARM diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index da2d1eb2..aed139d2 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -37,7 +37,7 @@ #elif defined ZMQ_HAVE_ATOMIC_INTRINSICS #define ZMQ_ATOMIC_PTR_INTRINSIC #elif (defined ZMQ_CXX11 && defined __cplusplus && __cplusplus >= 201103L) -#define ZMQ_ATOMIC_CXX11 +#define ZMQ_ATOMIC_PTR_CXX11 #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_PTR_X86 #elif defined __ARM_ARCH_7A__ && defined __GNUC__ @@ -54,7 +54,7 @@ #if defined ZMQ_ATOMIC_PTR_MUTEX #include "mutex.hpp" -#elif defined ZMQ_ATOMIC_CXX11 +#elif defined ZMQ_ATOMIC_PTR_CXX11 #include #elif defined ZMQ_ATOMIC_PTR_WINDOWS #include "windows.hpp" @@ -100,7 +100,7 @@ namespace zmq return (T*) InterlockedExchangePointer ((PVOID*) &ptr, val_); #elif defined ZMQ_ATOMIC_PTR_INTRINSIC return (T*) __atomic_exchange_n (&ptr, val_, __ATOMIC_ACQ_REL); -#elif defined ZMQ_ATOMIC_CXX11 +#elif defined ZMQ_ATOMIC_PTR_CXX11 return ptr.exchange(val_, std::memory_order_acq_rel); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_swap_ptr (&ptr, val_); @@ -152,7 +152,7 @@ namespace zmq __atomic_compare_exchange_n (&ptr, (volatile T**) &old, val_, false, __ATOMIC_RELEASE, __ATOMIC_ACQUIRE); return old; -#elif defined ZMQ_ATOMIC_CXX11 +#elif defined ZMQ_ATOMIC_PTR_CXX11 ptr.compare_exchange_strong(cmp_, val_, std::memory_order_acq_rel); return cmp_; #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H @@ -198,7 +198,7 @@ namespace zmq private: -#if defined ZMQ_ATOMIC_CXX11 +#if defined ZMQ_ATOMIC_PTR_CXX11 std::atomic ptr; #else volatile T *ptr; @@ -208,7 +208,7 @@ namespace zmq mutex_t sync; #endif -#if ! defined ZMQ_ATOMIC_CXX11 +#if ! defined ZMQ_ATOMIC_PTR_CXX11 atomic_ptr_t (const atomic_ptr_t&); const atomic_ptr_t &operator = (const atomic_ptr_t&); #endif @@ -219,7 +219,7 @@ namespace zmq // Remove macros local to this file. #undef ZMQ_ATOMIC_PTR_MUTEX #undef ZMQ_ATOMIC_PTR_INTRINSIC -#undef ZMQ_ATOMIC_CXX11 +#undef ZMQ_ATOMIC_PTR_CXX11 #undef ZMQ_ATOMIC_PTR_X86 #undef ZMQ_ATOMIC_PTR_ARM #undef ZMQ_ATOMIC_PTR_TILE From 36797936010f9dd50f12152d2b385361bac7b0c5 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Sun, 14 Jun 2015 19:00:52 +0200 Subject: [PATCH 072/108] "zero-copy" raw_decoder A memcpy is eliminated when receiving data on a ZMQ_STREAM socket. Instead of receiving into a static buffer and then copying the data into the buffer malloced in msg_t::init_size, the raw_decoder allocates the memory for together with the reference-counter and creates a msg_t object on top of that memory. This saves the memcpy operation. For small messages, data is still copied and the receive buffer is reused. --- CMakeLists.txt | 3 +- Makefile.am | 5 +- src/decoder.hpp | 44 +---------- src/decoder_allocators.cpp | 146 ++++++++++++++++++++++++++++++++++++ src/decoder_allocators.hpp | 149 +++++++++++++++++++++++++++++++++++++ src/raw_decoder.cpp | 25 ++++--- src/raw_decoder.hpp | 8 +- src/v2_decoder.cpp | 100 ------------------------- src/v2_decoder.hpp | 63 +--------------- 9 files changed, 320 insertions(+), 223 deletions(-) create mode 100644 src/decoder_allocators.cpp create mode 100644 src/decoder_allocators.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a3877fa..279033cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -435,7 +435,8 @@ set(cxx-sources xpub.cpp xsub.cpp zmq.cpp - zmq_utils.cpp) + zmq_utils.cpp + decoder_allocators.cpp) set(rc-sources version.rc) diff --git a/Makefile.am b/Makefile.am index 86b1b4bd..da9c2bad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -207,7 +207,10 @@ src_libzmq_la_SOURCES = \ src/ypipe_conflate.hpp \ src/yqueue.hpp \ src/zmq.cpp \ - src/zmq_utils.cpp + src/zmq_utils.cpp \ + src/decoder_allocators.hpp \ + src/decoder_allocators.cpp + if ON_MINGW src_libzmq_la_LDFLAGS = \ diff --git a/src/decoder.hpp b/src/decoder.hpp index 4d00d45d..2190f980 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -39,52 +39,10 @@ #include "msg.hpp" #include "i_decoder.hpp" #include "stdint.hpp" +#include "decoder_allocators.hpp" namespace zmq { - // Static buffer policy. - class c_single_allocator - { - public: - c_single_allocator(size_t bufsize_): - bufsize(bufsize_), - buf((unsigned char*) malloc (bufsize)) - { - alloc_assert (buf); - } - - ~c_single_allocator() - { - free(buf); - } - - unsigned char* allocate() - { - return buf; - } - - void deallocate() - { - - } - - size_t size() const - { - return bufsize; - } - - void resize(size_t new_size) - { - bufsize = new_size; - } - private: - size_t bufsize; - unsigned char* buf; - - c_single_allocator( c_single_allocator const& ); - c_single_allocator& operator=(c_single_allocator const&); - }; - // Helper base class for decoders that know the amount of data to read // in advance at any moment. Knowing the amount in advance is a property // of the protocol used. 0MQ framing protocol is based size-prefixed diff --git a/src/decoder_allocators.cpp b/src/decoder_allocators.cpp new file mode 100644 index 00000000..4068ed6a --- /dev/null +++ b/src/decoder_allocators.cpp @@ -0,0 +1,146 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of libzmq, the ZeroMQ core engine in C++. + + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "decoder_allocators.hpp" + +#include + +#include "msg.hpp" + +zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): + buf(NULL), + bufsize( 0 ), + max_size( bufsize_ ), + msg_refcnt( NULL ), + maxCounters( std::ceil( (double)max_size / (double)msg_t::max_vsm_size) ) +{ + +} + +zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_, size_t maxMessages): + buf(NULL), + bufsize( 0 ), + max_size( bufsize_ ), + msg_refcnt( NULL ), + maxCounters( maxMessages ) +{ + +} + +zmq::shared_message_memory_allocator::~shared_message_memory_allocator() +{ + if (buf) { + deallocate(); + } +} + +unsigned char* zmq::shared_message_memory_allocator::allocate() +{ + if (buf) + { + // release reference count to couple lifetime to messages + zmq::atomic_counter_t *c = reinterpret_cast(buf); + + // if refcnt drops to 0, there are no message using the buffer + // because either all messages have been closed or only vsm-messages + // were created + if (c->sub(1)) { + // buffer is still in use as message data. "Release" it and create a new one + // release pointer because we are going to create a new buffer + release(); + } + } + + // if buf != NULL it is not used by any message so we can re-use it for the next run + if (!buf) { + // allocate memory for reference counters together with reception buffer + size_t const allocationsize = max_size + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); + + buf = (unsigned char *) malloc(allocationsize); + alloc_assert (buf); + + new(buf) atomic_counter_t(1); + } + else + { + // release reference count to couple lifetime to messages + zmq::atomic_counter_t *c = reinterpret_cast(buf); + c->set(1); + } + + bufsize = max_size; + msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + max_size ); + return buf + sizeof( zmq::atomic_counter_t); +} + +void zmq::shared_message_memory_allocator::deallocate() +{ + free(buf); + buf = NULL; + bufsize = 0; + msg_refcnt = NULL; +} + +unsigned char* zmq::shared_message_memory_allocator::release() +{ + unsigned char* b = buf; + buf = NULL; + bufsize = 0; + msg_refcnt = NULL; + + return b; +} + +void zmq::shared_message_memory_allocator::inc_ref() +{ + ((zmq::atomic_counter_t*)buf)->add(1); +} + +void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { + zmq_assert( hint ); + unsigned char* buf = static_cast(hint); + zmq::atomic_counter_t *c = reinterpret_cast(buf); + + if (!c->sub(1)) { + c->~atomic_counter_t(); + free(buf); + buf = NULL; + } +} + + +size_t zmq::shared_message_memory_allocator::size() const +{ + return bufsize; +} + +unsigned char* zmq::shared_message_memory_allocator::data() +{ + return buf + sizeof(zmq::atomic_counter_t); +} \ No newline at end of file diff --git a/src/decoder_allocators.hpp b/src/decoder_allocators.hpp new file mode 100644 index 00000000..28edc543 --- /dev/null +++ b/src/decoder_allocators.hpp @@ -0,0 +1,149 @@ +/* + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file + + This file is part of libzmq, the ZeroMQ core engine in C++. + + libzmq is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + As a special exception, the Contributors give you permission to link + this library with independent modules to produce an executable, + regardless of the license terms of these independent modules, and to + copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the + terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. + If you modify this library, you must extend this exception to your + version of the library. + + libzmq is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#ifndef ZEROMQ_DECODER_ALLOCATORS_HPP +#define ZEROMQ_DECODER_ALLOCATORS_HPP + +#include + +#include "err.hpp" +#include "atomic_counter.hpp" + +namespace zmq +{ + // Static buffer policy. + class c_single_allocator + { + public: + c_single_allocator(size_t bufsize_): + bufsize(bufsize_), + buf((unsigned char*) malloc (bufsize)) + { + alloc_assert (buf); + } + + ~c_single_allocator() + { + free(buf); + } + + unsigned char* allocate() + { + return buf; + } + + void deallocate() + { + + } + + size_t size() const + { + return bufsize; + } + + void resize(size_t new_size) + { + bufsize = new_size; + } + private: + size_t bufsize; + unsigned char* buf; + + c_single_allocator( c_single_allocator const& ); + c_single_allocator& operator=(c_single_allocator const&); + }; + + // This allocater allocates a reference counted buffer which is used by v2_decoder_t + // to use zero-copy msg::init_data to create messages with memory from this buffer as + // data storage. + // + // The buffer is allocated with a reference count of 1 to make sure that is is alive while + // decoding messages. Otherwise, it is possible that e.g. the first message increases the count + // from zero to one, gets passed to the user application, processed in the user thread and deleted + // which would then deallocate the buffer. The drawback is that the buffer may be allocated longer + // than necessary because it is only deleted when allocate is called the next time. + class shared_message_memory_allocator + { + public: + shared_message_memory_allocator(size_t bufsize_); + + // Create an allocator for a maximum number of messages + shared_message_memory_allocator(size_t bufsize_, size_t maxMessages); + + ~shared_message_memory_allocator(); + + // Allocate a new buffer + // + // This releases the current buffer to be bound to the lifetime of the messages + // created on this bufer. + unsigned char* allocate(); + + // force deallocation of buffer. + void deallocate(); + + // Give up ownership of the buffer. The buffer's lifetime is now coupled to + // the messages constructed on top of it. + unsigned char* release(); + + void inc_ref(); + + static void call_dec_ref(void*, void* buffer); + + size_t size() const; + + // Return pointer to the first message data byte. + unsigned char* data(); + + // Return pointer to the first byte of the buffer. + unsigned char* buffer() + { + return buf; + } + + void resize(size_t new_size) + { + bufsize = new_size; + } + + // + zmq::atomic_counter_t* create_refcnt() + { + return msg_refcnt++; + } + + private: + unsigned char* buf; + size_t bufsize; + size_t max_size; + zmq::atomic_counter_t* msg_refcnt; + size_t maxCounters; + }; +} +#endif //ZEROMQ_DECODER_ALLOCATORS_HPP diff --git a/src/raw_decoder.cpp b/src/raw_decoder.cpp index b98826cb..ceffd383 100644 --- a/src/raw_decoder.cpp +++ b/src/raw_decoder.cpp @@ -39,35 +39,38 @@ #include "err.hpp" zmq::raw_decoder_t::raw_decoder_t (size_t bufsize_) : - bufsize (bufsize_) + allocator( bufsize_, 1 ) { int rc = in_progress.init (); errno_assert (rc == 0); - - buffer = (unsigned char *) malloc (bufsize); - alloc_assert (buffer); } zmq::raw_decoder_t::~raw_decoder_t () { int rc = in_progress.close (); errno_assert (rc == 0); - - free (buffer); } void zmq::raw_decoder_t::get_buffer (unsigned char **data_, size_t *size_) { - *data_ = buffer; - *size_ = bufsize; + *data_ = allocator.allocate(); + *size_ = allocator.size(); } int zmq::raw_decoder_t::decode (const uint8_t *data_, size_t size_, - size_t &bytes_used_) + size_t &bytes_used_) { - int rc = in_progress.init_size (size_); + int rc = in_progress.init ((unsigned char*)data_, size_, + shared_message_memory_allocator::call_dec_ref, + allocator.create_refcnt() ); + + // if the buffer serves as memory for a zero-copy message, release it + // and allocate a new buffer in get_buffer for the next decode + if (in_progress.is_zcmsg()) { + allocator.release(); + } + errno_assert (rc != -1); - memcpy (in_progress.data (), data_, size_); bytes_used_ = size_; return 1; } diff --git a/src/raw_decoder.hpp b/src/raw_decoder.hpp index 31310174..b119edcb 100644 --- a/src/raw_decoder.hpp +++ b/src/raw_decoder.hpp @@ -34,6 +34,7 @@ #include "msg.hpp" #include "i_decoder.hpp" #include "stdint.hpp" +#include "decoder_allocators.hpp" namespace zmq { @@ -57,14 +58,11 @@ namespace zmq virtual msg_t *msg () { return &in_progress; } virtual void resize_buffer(size_t) {} + private: - - msg_t in_progress; - const size_t bufsize; - - unsigned char *buffer; + shared_message_memory_allocator allocator; raw_decoder_t (const raw_decoder_t&); void operator = (const raw_decoder_t&); diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index b4873ceb..557fb7d3 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -42,107 +42,7 @@ #include "wire.hpp" #include "err.hpp" -zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): - buf(NULL), - bufsize( 0 ), - max_size( bufsize_ ), - msg_refcnt( NULL ) -{ -} - -zmq::shared_message_memory_allocator::~shared_message_memory_allocator() -{ - if (buf) { - deallocate(); - } -} - -unsigned char* zmq::shared_message_memory_allocator::allocate() -{ - if (buf) - { - // release reference count to couple lifetime to messages - zmq::atomic_counter_t *c = reinterpret_cast(buf); - - // if refcnt drops to 0, there are no message using the buffer - // because either all messages have been closed or only vsm-messages - // were created - if (c->sub(1)) { - // buffer is still in use as message data. "Release" it and create a new one - // release pointer because we are going to create a new buffer - release(); - } - } - - // if buf != NULL it is not used by any message so we can re-use it for the next run - if (!buf) { - // allocate memory for reference counters together with reception buffer - size_t const maxCounters = std::ceil( (double)max_size / (double)msg_t::max_vsm_size); - size_t const allocationsize = max_size + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); - - buf = (unsigned char *) malloc(allocationsize); - alloc_assert (buf); - - new(buf) atomic_counter_t(1); - } - else - { - // release reference count to couple lifetime to messages - zmq::atomic_counter_t *c = reinterpret_cast(buf); - c->set(1); - } - - bufsize = max_size; - msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + max_size ); - return buf + sizeof( zmq::atomic_counter_t); -} - -void zmq::shared_message_memory_allocator::deallocate() -{ - free(buf); - buf = NULL; - bufsize = 0; - msg_refcnt = NULL; -} - -unsigned char* zmq::shared_message_memory_allocator::release() -{ - unsigned char* b = buf; - buf = NULL; - bufsize = 0; - msg_refcnt = NULL; - - return b; -} - -void zmq::shared_message_memory_allocator::inc_ref() -{ - ((zmq::atomic_counter_t*)buf)->add(1); -} - -void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { - zmq_assert( hint ); - unsigned char* buf = static_cast(hint); - zmq::atomic_counter_t *c = reinterpret_cast(buf); - - if (!c->sub(1)) { - c->~atomic_counter_t(); - free(buf); - buf = NULL; - } -} - - -size_t zmq::shared_message_memory_allocator::size() const -{ - return bufsize; -} - -unsigned char* zmq::shared_message_memory_allocator::data() -{ - return buf + sizeof(zmq::atomic_counter_t); -} zmq::v2_decoder_t::v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_) : shared_message_memory_allocator( bufsize_), diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index 44c9fe05..229d1cc0 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -31,71 +31,10 @@ #define __ZMQ_V2_DECODER_HPP_INCLUDED__ #include "decoder.hpp" +#include "decoder_allocators.hpp" namespace zmq { - // This allocater allocates a reference counted buffer which is used by v2_decoder_t - // to use zero-copy msg::init_data to create messages with memory from this buffer as - // data storage. - // - // The buffer is allocated with a reference count of 1 to make sure that is is alive while - // decoding messages. Otherwise, it is possible that e.g. the first message increases the count - // from zero to one, gets passed to the user application, processed in the user thread and deleted - // which would then deallocate the buffer. The drawback is that the buffer may be allocated longer - // than necessary because it is only deleted when allocate is called the next time. - class shared_message_memory_allocator - { - public: - shared_message_memory_allocator(size_t bufsize_); - - ~shared_message_memory_allocator(); - - // Allocate a new buffer - // - // This releases the current buffer to be bound to the lifetime of the messages - // created on this bufer. - unsigned char* allocate(); - - // force deallocation of buffer. - void deallocate(); - - // Give up ownership of the buffer. The buffer's lifetime is now coupled to - // the messages constructed on top of it. - unsigned char* release(); - - void inc_ref(); - - static void call_dec_ref(void*, void* buffer); - - size_t size() const; - - // Return pointer to the first message data byte. - unsigned char* data(); - - // Return pointer to the first byte of the buffer. - unsigned char* buffer() - { - return buf; - } - - void resize(size_t new_size) - { - bufsize = new_size; - } - - // - zmq::atomic_counter_t* create_refcnt() - { - return msg_refcnt++; - } - - private: - unsigned char* buf; - size_t bufsize; - size_t max_size; - zmq::atomic_counter_t* msg_refcnt; - }; - // Decoder for ZMTP/2.x framing protocol. Converts data stream into messages. // The class has to inherit from shared_message_memory_allocator because // the base class calls allocate in its constructor. From ef365151caee83c411aa346c745f7581065efae2 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Sun, 5 Jul 2015 23:19:41 +0200 Subject: [PATCH 073/108] - Replaced C-style casts with C++-casts - Replaced stdlib.h with cstdlib - Made single-argument constructors explicit --- src/decoder_allocators.cpp | 12 +++++------- src/decoder_allocators.hpp | 10 +++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/decoder_allocators.cpp b/src/decoder_allocators.cpp index 4068ed6a..2fbf9024 100644 --- a/src/decoder_allocators.cpp +++ b/src/decoder_allocators.cpp @@ -38,7 +38,7 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t buf bufsize( 0 ), max_size( bufsize_ ), msg_refcnt( NULL ), - maxCounters( std::ceil( (double)max_size / (double)msg_t::max_vsm_size) ) + maxCounters( std::ceil( static_cast(max_size) / static_cast(msg_t::max_vsm_size)) ) { } @@ -55,9 +55,7 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t buf zmq::shared_message_memory_allocator::~shared_message_memory_allocator() { - if (buf) { - deallocate(); - } + deallocate(); } unsigned char* zmq::shared_message_memory_allocator::allocate() @@ -82,7 +80,7 @@ unsigned char* zmq::shared_message_memory_allocator::allocate() // allocate memory for reference counters together with reception buffer size_t const allocationsize = max_size + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); - buf = (unsigned char *) malloc(allocationsize); + buf = static_cast( malloc(allocationsize) ); alloc_assert (buf); new(buf) atomic_counter_t(1); @@ -101,7 +99,7 @@ unsigned char* zmq::shared_message_memory_allocator::allocate() void zmq::shared_message_memory_allocator::deallocate() { - free(buf); + std::free(buf); buf = NULL; bufsize = 0; msg_refcnt = NULL; @@ -119,7 +117,7 @@ unsigned char* zmq::shared_message_memory_allocator::release() void zmq::shared_message_memory_allocator::inc_ref() { - ((zmq::atomic_counter_t*)buf)->add(1); + (reinterpret_cast(buf))->add(1); } void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { diff --git a/src/decoder_allocators.hpp b/src/decoder_allocators.hpp index 28edc543..9dfc2617 100644 --- a/src/decoder_allocators.hpp +++ b/src/decoder_allocators.hpp @@ -30,7 +30,7 @@ #ifndef ZEROMQ_DECODER_ALLOCATORS_HPP #define ZEROMQ_DECODER_ALLOCATORS_HPP -#include +#include #include "err.hpp" #include "atomic_counter.hpp" @@ -41,16 +41,16 @@ namespace zmq class c_single_allocator { public: - c_single_allocator(size_t bufsize_): + explicit c_single_allocator(size_t bufsize_): bufsize(bufsize_), - buf((unsigned char*) malloc (bufsize)) + buf(static_cast( malloc (bufsize) )) { alloc_assert (buf); } ~c_single_allocator() { - free(buf); + std::free(buf); } unsigned char* allocate() @@ -92,7 +92,7 @@ namespace zmq class shared_message_memory_allocator { public: - shared_message_memory_allocator(size_t bufsize_); + explicit shared_message_memory_allocator(size_t bufsize_); // Create an allocator for a maximum number of messages shared_message_memory_allocator(size_t bufsize_, size_t maxMessages); From 5b4b8a063b951fc5855a6fe1f2a557b67e954963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 6 Jul 2015 00:01:52 +0100 Subject: [PATCH 074/108] [decoder*] Style fixes for consistency --- src/decoder.hpp | 72 +++++++++++++++-------------- src/decoder_allocators.cpp | 92 +++++++++++++++++++------------------- src/decoder_allocators.hpp | 66 +++++++++++++-------------- 3 files changed, 113 insertions(+), 117 deletions(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 2190f980..4c69b853 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -30,16 +30,15 @@ #ifndef __ZMQ_DECODER_HPP_INCLUDED__ #define __ZMQ_DECODER_HPP_INCLUDED__ -#include -#include -#include #include +#include +#include -#include "err.hpp" -#include "msg.hpp" -#include "i_decoder.hpp" -#include "stdint.hpp" #include "decoder_allocators.hpp" +#include "err.hpp" +#include "i_decoder.hpp" +#include "msg.hpp" +#include "stdint.hpp" namespace zmq { @@ -60,26 +59,26 @@ namespace zmq { public: - inline decoder_base_t (A* allocator_) : - next (NULL), - read_pos (NULL), - to_read (0), - allocator( allocator_ ) + explicit decoder_base_t (A *allocator_) : + next (NULL), + read_pos (NULL), + to_read (0), + allocator(allocator_) { - buf = allocator->allocate(); + buf = allocator->allocate (); } - // The destructor doesn't have to be virtual. It is mad virtual + // The destructor doesn't have to be virtual. It is made virtual // just to keep ICC and code checking tools from complaining. - inline virtual ~decoder_base_t () + virtual ~decoder_base_t () { - allocator->deallocate(); + allocator->deallocate (); } // Returns a buffer to be filled with binary data. - inline void get_buffer (unsigned char **data_, size_t *size_) + void get_buffer (unsigned char **data_, std::size_t *size_) { - buf = allocator->allocate(); + buf = allocator->allocate (); // If we are expected to read large message, we'll opt for zero- // copy, i.e. we'll ask caller to fill the data directly to the @@ -89,14 +88,14 @@ namespace zmq // As a consequence, large messages being received won't block // other engines running in the same I/O thread for excessive // amounts of time. - if (to_read >= allocator->size()) { + if (to_read >= allocator->size ()) { *data_ = read_pos; *size_ = to_read; return; } *data_ = buf; - *size_ = allocator->size(); + *size_ = allocator->size (); } // Processes the data in the buffer previously allocated using @@ -105,8 +104,8 @@ namespace zmq // whole message was decoded or 0 when more data is required. // On error, -1 is returned and errno set accordingly. // Number of bytes processed is returned in byts_used_. - inline int decode (const unsigned char *data_, size_t size_, - size_t &bytes_used_) + int decode (const unsigned char *data_, std::size_t size_, + std::size_t &bytes_used_) { bytes_used_ = 0; @@ -120,7 +119,7 @@ namespace zmq bytes_used_ = size_; while (!to_read) { - const int rc = (static_cast (this)->*next) (data_ + bytes_used_); + const int rc = (static_cast (this)->*next) (data_ + bytes_used_); if (rc != 0) return rc; } @@ -129,11 +128,11 @@ namespace zmq while (bytes_used_ < size_) { // Copy the data from buffer to the message. - const size_t to_copy = std::min (to_read, size_ - bytes_used_); + const std::size_t to_copy = std::min (to_read, size_ - bytes_used_); // only copy when the destination address is different from the // current address in the buffer if (read_pos != data_ + bytes_used_) { - memcpy(read_pos, data_ + bytes_used_, to_copy); + std::memcpy (read_pos, data_ + bytes_used_, to_copy); } read_pos += to_copy; @@ -143,7 +142,7 @@ namespace zmq // If none is available, return. while (to_read == 0) { // pass current address in the buffer - const int rc = (static_cast (this)->*next) (data_ + bytes_used_); + const int rc = (static_cast (this)->*next) (data_ + bytes_used_); if (rc != 0) return rc; } @@ -152,22 +151,22 @@ namespace zmq return 0; } - virtual void resize_buffer(size_t new_size) + virtual void resize_buffer (std::size_t new_size) { - allocator->resize(new_size); + allocator->resize (new_size); } protected: // Prototype of state machine action. Action should return false if // it is unable to push the data to the system. - typedef int (T::*step_t) (unsigned char const*); + typedef int (T:: *step_t) (unsigned char const *); // This function should be called from derived class to read data // from the buffer and schedule next state machine action. - inline void next_step (void *read_pos_, size_t to_read_, step_t next_) + void next_step (void *read_pos_, std::size_t to_read_, step_t next_) { - read_pos = (unsigned char*) read_pos_; + read_pos = static_cast (read_pos_); to_read = to_read_; next = next_; } @@ -183,16 +182,15 @@ namespace zmq unsigned char *read_pos; // How much data to read before taking next step. - size_t to_read; + std::size_t to_read; // The duffer for data to decode. - A* allocator; - unsigned char* buf; + A *allocator; + unsigned char *buf; - decoder_base_t (const decoder_base_t&); - const decoder_base_t &operator = (const decoder_base_t&); + decoder_base_t (const decoder_base_t &); + const decoder_base_t &operator = (const decoder_base_t &); }; } #endif - diff --git a/src/decoder_allocators.cpp b/src/decoder_allocators.cpp index 2fbf9024..f122e792 100644 --- a/src/decoder_allocators.cpp +++ b/src/decoder_allocators.cpp @@ -33,79 +33,76 @@ #include "msg.hpp" -zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_): - buf(NULL), - bufsize( 0 ), - max_size( bufsize_ ), - msg_refcnt( NULL ), - maxCounters( std::ceil( static_cast(max_size) / static_cast(msg_t::max_vsm_size)) ) +zmq::shared_message_memory_allocator::shared_message_memory_allocator (std::size_t bufsize_) : + buf(NULL), + bufsize(0), + max_size(bufsize_), + msg_refcnt(NULL), + maxCounters (std::ceil (static_cast (max_size) / static_cast (msg_t::max_vsm_size))) { - } -zmq::shared_message_memory_allocator::shared_message_memory_allocator(size_t bufsize_, size_t maxMessages): - buf(NULL), - bufsize( 0 ), - max_size( bufsize_ ), - msg_refcnt( NULL ), - maxCounters( maxMessages ) +zmq::shared_message_memory_allocator::shared_message_memory_allocator (std::size_t bufsize_, std::size_t maxMessages) : + buf(NULL), + bufsize(0), + max_size(bufsize_), + msg_refcnt(NULL), + maxCounters(maxMessages) { - } -zmq::shared_message_memory_allocator::~shared_message_memory_allocator() +zmq::shared_message_memory_allocator::~shared_message_memory_allocator () { deallocate(); } -unsigned char* zmq::shared_message_memory_allocator::allocate() +unsigned char* zmq::shared_message_memory_allocator::allocate () { - if (buf) - { + if (buf) { // release reference count to couple lifetime to messages - zmq::atomic_counter_t *c = reinterpret_cast(buf); + zmq::atomic_counter_t* c = reinterpret_cast(buf); // if refcnt drops to 0, there are no message using the buffer // because either all messages have been closed or only vsm-messages // were created - if (c->sub(1)) { + if (c->sub (1)) { // buffer is still in use as message data. "Release" it and create a new one // release pointer because we are going to create a new buffer - release(); + release (); } } // if buf != NULL it is not used by any message so we can re-use it for the next run if (!buf) { // allocate memory for reference counters together with reception buffer - size_t const allocationsize = max_size + sizeof(zmq::atomic_counter_t) + maxCounters * sizeof(zmq::atomic_counter_t); + std::size_t const allocationsize = + max_size + sizeof (zmq::atomic_counter_t) + + maxCounters * sizeof (zmq::atomic_counter_t); - buf = static_cast( malloc(allocationsize) ); + buf = static_cast (std::malloc (allocationsize)); alloc_assert (buf); - new(buf) atomic_counter_t(1); - } - else - { + new (buf) atomic_counter_t (1); + } else { // release reference count to couple lifetime to messages - zmq::atomic_counter_t *c = reinterpret_cast(buf); - c->set(1); + zmq::atomic_counter_t *c = reinterpret_cast (buf); + c->set (1); } bufsize = max_size; - msg_refcnt = reinterpret_cast( buf + sizeof(atomic_counter_t) + max_size ); - return buf + sizeof( zmq::atomic_counter_t); + msg_refcnt = reinterpret_cast (buf + sizeof (atomic_counter_t) + max_size); + return buf + sizeof (zmq::atomic_counter_t); } -void zmq::shared_message_memory_allocator::deallocate() +void zmq::shared_message_memory_allocator::deallocate () { - std::free(buf); + std::free (buf); buf = NULL; bufsize = 0; msg_refcnt = NULL; } -unsigned char* zmq::shared_message_memory_allocator::release() +unsigned char* zmq::shared_message_memory_allocator::release () { unsigned char* b = buf; buf = NULL; @@ -115,30 +112,31 @@ unsigned char* zmq::shared_message_memory_allocator::release() return b; } -void zmq::shared_message_memory_allocator::inc_ref() +void zmq::shared_message_memory_allocator::inc_ref () { - (reinterpret_cast(buf))->add(1); + (reinterpret_cast (buf))->add (1); } -void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) { - zmq_assert( hint ); - unsigned char* buf = static_cast(hint); - zmq::atomic_counter_t *c = reinterpret_cast(buf); +void zmq::shared_message_memory_allocator::call_dec_ref(void*, void* hint) +{ + zmq_assert (hint); + unsigned char* buf = static_cast (hint); + zmq::atomic_counter_t* c = reinterpret_cast (buf); - if (!c->sub(1)) { - c->~atomic_counter_t(); - free(buf); + if (!c->sub (1)) { + c->~atomic_counter_t (); + std::free (buf); buf = NULL; } } -size_t zmq::shared_message_memory_allocator::size() const +std::size_t zmq::shared_message_memory_allocator::size () const { return bufsize; } -unsigned char* zmq::shared_message_memory_allocator::data() +unsigned char* zmq::shared_message_memory_allocator::data () { - return buf + sizeof(zmq::atomic_counter_t); -} \ No newline at end of file + return buf + sizeof (zmq::atomic_counter_t); +} diff --git a/src/decoder_allocators.hpp b/src/decoder_allocators.hpp index 9dfc2617..25e90e7f 100644 --- a/src/decoder_allocators.hpp +++ b/src/decoder_allocators.hpp @@ -27,13 +27,14 @@ along with this program. If not, see . */ -#ifndef ZEROMQ_DECODER_ALLOCATORS_HPP -#define ZEROMQ_DECODER_ALLOCATORS_HPP +#ifndef __ZMQ_DECODER_ALLOCATORS_HPP_INCLUDED__ +#define __ZMQ_DECODER_ALLOCATORS_HPP_INCLUDED__ +#include #include -#include "err.hpp" #include "atomic_counter.hpp" +#include "err.hpp" namespace zmq { @@ -41,43 +42,42 @@ namespace zmq class c_single_allocator { public: - explicit c_single_allocator(size_t bufsize_): + explicit c_single_allocator (std::size_t bufsize_) : bufsize(bufsize_), - buf(static_cast( malloc (bufsize) )) + buf(static_cast (std::malloc (bufsize))) { alloc_assert (buf); } - ~c_single_allocator() + ~c_single_allocator () { - std::free(buf); + std::free (buf); } - unsigned char* allocate() + unsigned char* allocate () { return buf; } - void deallocate() + void deallocate () { - } - size_t size() const + std::size_t size () const { return bufsize; } - void resize(size_t new_size) + void resize (std::size_t new_size) { bufsize = new_size; } private: - size_t bufsize; + std::size_t bufsize; unsigned char* buf; - c_single_allocator( c_single_allocator const& ); - c_single_allocator& operator=(c_single_allocator const&); + c_single_allocator (c_single_allocator const&); + c_single_allocator& operator = (c_single_allocator const&); }; // This allocater allocates a reference counted buffer which is used by v2_decoder_t @@ -92,58 +92,58 @@ namespace zmq class shared_message_memory_allocator { public: - explicit shared_message_memory_allocator(size_t bufsize_); + explicit shared_message_memory_allocator (std::size_t bufsize_); // Create an allocator for a maximum number of messages - shared_message_memory_allocator(size_t bufsize_, size_t maxMessages); + shared_message_memory_allocator (std::size_t bufsize_, std::size_t maxMessages); - ~shared_message_memory_allocator(); + ~shared_message_memory_allocator (); // Allocate a new buffer // // This releases the current buffer to be bound to the lifetime of the messages // created on this bufer. - unsigned char* allocate(); + unsigned char* allocate (); // force deallocation of buffer. - void deallocate(); + void deallocate (); // Give up ownership of the buffer. The buffer's lifetime is now coupled to // the messages constructed on top of it. - unsigned char* release(); + unsigned char* release (); - void inc_ref(); + void inc_ref (); - static void call_dec_ref(void*, void* buffer); + static void call_dec_ref (void*, void* buffer); - size_t size() const; + std::size_t size () const; // Return pointer to the first message data byte. - unsigned char* data(); + unsigned char* data (); // Return pointer to the first byte of the buffer. - unsigned char* buffer() + unsigned char* buffer () { return buf; } - void resize(size_t new_size) + void resize (std::size_t new_size) { bufsize = new_size; } - // - zmq::atomic_counter_t* create_refcnt() + zmq::atomic_counter_t* create_refcnt () { return msg_refcnt++; } private: unsigned char* buf; - size_t bufsize; - size_t max_size; + std::size_t bufsize; + std::size_t max_size; zmq::atomic_counter_t* msg_refcnt; - size_t maxCounters; + std::size_t maxCounters; }; } -#endif //ZEROMQ_DECODER_ALLOCATORS_HPP + +#endif From 29b45489fa7ee97b8c1e12eb0ff8e638c0ea5b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 6 Jul 2015 00:20:46 +0100 Subject: [PATCH 075/108] [decoder.hpp] Fix misspelled inclusion --- src/decoder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 4c69b853..a4342a65 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include "decoder_allocators.hpp" #include "err.hpp" From 8339271a3ea7a919797d369aa36fd3fd7ee83ac9 Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Tue, 7 Jul 2015 12:16:21 +0300 Subject: [PATCH 076/108] LIBZMQ-195 on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK --- src/tcp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tcp.cpp b/src/tcp.cpp index 21814104..2b94becf 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -173,6 +173,11 @@ int zmq::tcp_write (fd_t s_, const void *data_, size_t size_) WSAGetLastError () == WSAECONNRESET)) return -1; + // Circumvent a Windows bug; see https://support.microsoft.com/en-us/kb/201213 + // and https://zeromq.jira.com/browse/LIBZMQ-195 + if (nbytes == SOCKET_ERROR && WSAGetLastError() == WSAENOBUFS) + return 0; + wsa_assert (nbytes != SOCKET_ERROR); return nbytes; From ccb13e17325960c088f7ed25a73c91c5565db58c Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Tue, 7 Jul 2015 19:05:53 +0300 Subject: [PATCH 077/108] add sanity check in msg_t::rm_refs in order to avoid invalid memory access with u.zclmsg.refcnt --- src/msg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msg.cpp b/src/msg.cpp index 73abb26e..07ce88e4 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -467,7 +467,7 @@ bool zmq::msg_t::rm_refs (int refs_) } // The only message type that needs special care are long and zcopy messages. - if (!u.lmsg.content->refcnt.sub (refs_)) { + if (u.base.type == type_lmsg && !u.lmsg.content->refcnt.sub(refs_)) { // We used "placement new" operator to initialize the reference // counter so we call the destructor explicitly now. u.lmsg.content->refcnt.~atomic_counter_t (); @@ -479,7 +479,7 @@ bool zmq::msg_t::rm_refs (int refs_) return false; } - if (!u.zclmsg.refcnt->sub (refs_)) { + if (is_zcmsg() && !u.zclmsg.refcnt->sub(refs_)) { // storage for rfcnt is provided externally if (u.zclmsg.ffn) { u.zclmsg.ffn(u.zclmsg.data, u.zclmsg.hint); From f7b933f570545def0d654b9408c92b82ac0e54f4 Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Mon, 6 Jul 2015 18:05:31 +0300 Subject: [PATCH 078/108] LIBZMQ-195 allow explicitly setting sndbuf and rcvbuf to 0 (see https://support.microsoft.com/en-us/kb/201213) --- src/options.cpp | 4 ++-- src/pgm_socket.cpp | 4 ++-- src/socks_connecter.cpp | 4 ++-- src/tcp_connecter.cpp | 4 ++-- src/tcp_listener.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/options.cpp b/src/options.cpp index 6742f92e..da86c3fb 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -41,8 +41,8 @@ zmq::options_t::options_t () : rate (100), recovery_ivl (10000), multicast_hops (1), - sndbuf (0), - rcvbuf (0), + sndbuf (-1), + rcvbuf (-1), tos (0), type (-1), linger (-1), diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 02655797..2557c668 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -196,14 +196,14 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_) { const int rcvbuf = (int) options.rcvbuf; - if (rcvbuf) { + if (rcvbuf >= 0) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof (rcvbuf))) goto err_abort; } const int sndbuf = (int) options.sndbuf; - if (sndbuf) { + if (sndbuf >= 0) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof (sndbuf))) goto err_abort; diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index bdc435ec..fb69ea7d 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -340,9 +340,9 @@ int zmq::socks_connecter_t::connect_to_proxy () unblock_socket (s); // Set the socket buffer limits for the underlying socket. - if (options.sndbuf != 0) + if (options.sndbuf >= 0) set_tcp_send_buffer (s, options.sndbuf); - if (options.rcvbuf != 0) + if (options.rcvbuf >= 0) set_tcp_receive_buffer (s, options.rcvbuf); // Set the IP Type-Of-Service for the underlying socket diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 17239a74..b328d487 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -258,9 +258,9 @@ int zmq::tcp_connecter_t::open () unblock_socket (s); // Set the socket buffer limits for the underlying socket. - if (options.sndbuf != 0) + if (options.sndbuf >= 0) set_tcp_send_buffer (s, options.sndbuf); - if (options.rcvbuf != 0) + if (options.rcvbuf >= 0) set_tcp_receive_buffer (s, options.rcvbuf); // Set the IP Type-Of-Service for the underlying socket diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index 26cc3f0f..1b37a3b5 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -207,9 +207,9 @@ int zmq::tcp_listener_t::set_address (const char *addr_) set_ip_type_of_service (s, options.tos); // Set the socket buffer limits for the underlying socket. - if (options.sndbuf != 0) + if (options.sndbuf >= 0) set_tcp_send_buffer (s, options.sndbuf); - if (options.rcvbuf != 0) + if (options.rcvbuf >= 0) set_tcp_receive_buffer (s, options.rcvbuf); // Allow reusing of the address. From 8096990e451b8e76b28c6205748f55bc13d8448f Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Wed, 8 Jul 2015 11:40:23 +0300 Subject: [PATCH 079/108] update documentation regarding the sndbuf and rcvbuf parameters --- doc/zmq_getsockopt.txt | 6 ++---- doc/zmq_setsockopt.txt | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index 5213c0ea..a2a9d161 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -566,14 +566,12 @@ Applicable socket types:: all, when using multicast transports ZMQ_SNDBUF: Retrieve kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer -size for the specified 'socket'. A value of zero means that the OS default is -in effect. For details refer to your operating system documentation for the -'SO_SNDBUF' socket option. +size for the specified 'socket'. For details refer to your operating system +documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes -Default value:: 0 Applicable socket types:: all diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 3a8c83bb..cb89f0d0 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -660,14 +660,14 @@ Applicable socket types:: ZMQ_ROUTER ZMQ_SNDBUF: Set kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size -for the 'socket' to the specified size in bytes. A value of zero means leave +for the 'socket' to the specified size in bytes. A value of -1 means leave the OS default unchanged. For details please refer to your operating system documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes -Default value:: 0 +Default value:: -1 Applicable socket types:: all From 7362f3af0f35d97645cda6ddb33fa8f0d7276246 Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Wed, 8 Jul 2015 11:58:42 +0300 Subject: [PATCH 080/108] update documentation regarding the rcvbuf parameter --- doc/zmq_getsockopt.txt | 6 ++---- doc/zmq_setsockopt.txt | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index a2a9d161..e011a473 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -450,14 +450,12 @@ Applicable socket types:: all, when using multicast transports ZMQ_RCVBUF: Retrieve kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer -size for the specified 'socket'. A value of zero means that the OS default is -in effect. For details refer to your operating system documentation for the -'SO_RCVBUF' socket option. +size for the specified 'socket'. For details refer to your operating system +documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes -Default value:: 0 Applicable socket types:: all diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index cb89f0d0..d4146da5 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -469,14 +469,14 @@ Applicable socket types:: all, when using multicast transports ZMQ_RCVBUF: Set kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for -the 'socket' to the specified size in bytes. A value of zero means leave the +the 'socket' to the specified size in bytes. A value of -1 means leave the OS default unchanged. For details refer to your operating system documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes -Default value:: 0 +Default value:: -1 Applicable socket types:: all From 4a5998382c66a6359cfb729afe84025da4b86787 Mon Sep 17 00:00:00 2001 From: leonarf Date: Thu, 16 Jul 2015 08:59:19 +0200 Subject: [PATCH 081/108] THREAD PRIORITY option documentation Added documentation about context's options ZMQ_THREAD_SCHED_POLICY and ZMQ_THREAD_PRIORITY --- doc/zmq_ctx_set.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/zmq_ctx_set.txt b/doc/zmq_ctx_set.txt index bf848332..6c9b24ca 100644 --- a/doc/zmq_ctx_set.txt +++ b/doc/zmq_ctx_set.txt @@ -47,6 +47,28 @@ context. [horizontal] Default value:: 1 +ZMQ_THREAD_SCHED_POLICY: Set scheduling policy for I/O threads +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_THREAD_SCHED_POLICY' argument sets the scheduling policy for +internal context's thread pool. This option is not available on windows. +Supported values for this option can be found in sched.h file, +or at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. +This option only applies before creating any sockets on the context. + +[horizontal] +Default value:: -1 + +ZMQ_THREAD_PRIORITY: Set scheduling priority for I/O threads +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_THREAD_PRIORITY' argument sets scheduling priority for +internal context's thread pool. This option is not available on windows. +Supported values for this option depend on chosen scheduling policy. +Details can be found in sched.h file, or at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. +This option only applies before creating any sockets on the context. + +[horizontal] +Default value:: -1 + ZMQ_MAX_SOCKETS: Set maximum number of sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MAX_SOCKETS' argument sets the maximum number of sockets allowed From 7030bc429ac98a164501a25d82279f4874015cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?= Date: Sun, 19 Jul 2015 12:20:45 +0100 Subject: [PATCH 082/108] Fix doc formatting issues in zmq_setsockopt page --- doc/zmq_setsockopt.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index d4146da5..903e9761 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -246,6 +246,7 @@ Option value unit:: milliseconds Default value:: 30000 Applicable socket types:: all but ZMQ_STREAM, only for connection-oriented transports + ZMQ_HEARTBEAT_IVL: Set interval between sending ZMTP heartbeats ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_HEARTBEAT_IVL' option shall set the interval between sending ZMTP heartbeats @@ -258,6 +259,7 @@ Option value unit:: milliseconds Default value:: 0 Applicable socket types:: all, when using connection-oriented transports + ZMQ_HEARTBEAT_TIMEOUT: Set timeout for ZMTP heartbeats ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_HEARTBEAT_TIMEOUT' option shall set how long to wait before timing-out a @@ -273,6 +275,7 @@ Option value unit:: milliseconds Default value:: 0 Applicable socket types:: all, when using connection-oriented transports + ZMQ_HEARTBEAT_TTL: Set the TTL value for ZMTP heartbeats ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_HEARTBEAT_TTL' option shall set the timeout on the remote peer for ZMTP @@ -288,6 +291,7 @@ Option value unit:: milliseconds Default value:: 0 Applicable socket types:: all, when using connection-oriented transports + ZMQ_IDENTITY: Set socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket' @@ -834,9 +838,9 @@ Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_XPUB -ZMQ_XPUB_MANUAL: change the subscription handling to manual -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ZMQ_XPUB_MANUAL: change the subscription handling to manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the 'XPUB' socket subscription handling mode manual/automatic. A value of '0' is the default and subscription requests will be handled automatically. A value of '1' will change the subscription requests handling to manual, @@ -849,6 +853,7 @@ Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_XPUB + ZMQ_XPUB_NODROP: do not silently drop messages if SENDHWM is reached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the 'XPUB' socket behaviour to return error EAGAIN if SENDHWM is @@ -864,9 +869,9 @@ Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_XPUB, ZMQ_PUB -ZMQ_WELCOME_MSG: set welcome message that will be received by subscriber when connecting -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ZMQ_WELCOME_MSG: set welcome message that will be received by subscriber when connecting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets a welcome message the will be recieved by subscriber when connecting. Subscriber must subscribe to the Welcome message before connecting. Welcome message will also be sent on reconnecting. @@ -880,6 +885,7 @@ Option value unit:: N/A Default value:: NULL Applicable socket types:: ZMQ_XPUB + ZMQ_ZAP_DOMAIN: Set RFC 27 authentication domain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the From 23797120ffff5de35fc1a0572b78ddfcbba17b8d Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Mon, 20 Jul 2015 22:22:13 +0200 Subject: [PATCH 083/108] Fixed #1477 corruption in "zero-copy" raw_decoder for payloads larger than 8192 bytes #1477 Fixed wrong message::init arguments. --- Makefile.am | 6 +- src/raw_decoder.cpp | 1 + tests/test_stream_exceeds_buffer.cpp | 83 ++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 tests/test_stream_exceeds_buffer.cpp diff --git a/Makefile.am b/Makefile.am index da9c2bad..eed71589 100644 --- a/Makefile.am +++ b/Makefile.am @@ -364,7 +364,8 @@ test_apps = \ tests/test_client_drop_more \ tests/test_thread_safe \ tests/test_socketopt_hwm \ - tests/test_heartbeats + tests/test_heartbeats \ + tests/test_stream_exceeds_buffer tests_test_system_SOURCES = tests/test_system.cpp tests_test_system_LDADD = src/libzmq.la @@ -569,6 +570,9 @@ tests_test_socketopt_hwm_LDADD = src/libzmq.la tests_test_heartbeats_SOURCES = tests/test_heartbeats.cpp tests_test_heartbeats_LDADD = src/libzmq.la +tests_test_stream_exceeds_buffer_SOURCES = tests/test_stream_exceeds_buffer.cpp +tests_test_stream_exceeds_buffer_LDADD = src/libzmq.la + if !ON_MINGW if !ON_CYGWIN test_apps += \ diff --git a/src/raw_decoder.cpp b/src/raw_decoder.cpp index ceffd383..125d9ba5 100644 --- a/src/raw_decoder.cpp +++ b/src/raw_decoder.cpp @@ -62,6 +62,7 @@ int zmq::raw_decoder_t::decode (const uint8_t *data_, size_t size_, { int rc = in_progress.init ((unsigned char*)data_, size_, shared_message_memory_allocator::call_dec_ref, + allocator.buffer(), allocator.create_refcnt() ); // if the buffer serves as memory for a zero-copy message, release it diff --git a/tests/test_stream_exceeds_buffer.cpp b/tests/test_stream_exceeds_buffer.cpp new file mode 100644 index 00000000..9d126088 --- /dev/null +++ b/tests/test_stream_exceeds_buffer.cpp @@ -0,0 +1,83 @@ +#include +#include +#include + +#include +#include + +#include + +int main() +{ + const int msgsize = 8193; + char sndbuf[msgsize] = "\xde\xad\xbe\xef"; + unsigned char rcvbuf[msgsize]; + + int server_sock = socket(AF_INET, SOCK_STREAM, 0); + assert(server_sock!=-1); + int enable = 1; + int rc = setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)); + assert(rc!=-1); + + struct sockaddr_in saddr; + memset(&saddr, 0, sizeof(saddr)); + saddr.sin_family = AF_INET; + saddr.sin_addr.s_addr = INADDR_ANY; + saddr.sin_port = htons(12345); + + rc = bind(server_sock, (struct sockaddr *)&saddr, sizeof(saddr)); + assert(rc!=-1); + rc = listen(server_sock, 1); + assert(rc!=-1); + + void *zctx = zmq_ctx_new(); + assert(zctx); + void *zsock = zmq_socket(zctx, ZMQ_STREAM); + assert(zsock); + rc = zmq_connect(zsock, "tcp://127.0.0.1:12345"); + assert(rc!=-1); + + int client_sock = accept(server_sock, NULL, NULL); + assert(client_sock!=-1); + + rc = close(server_sock); + assert(rc!=-1); + + rc = send(client_sock, sndbuf, msgsize, 0); + assert(rc==msgsize); + + zmq_msg_t msg; + zmq_msg_init(&msg); + + int rcvbytes = 0; + while (rcvbytes==0) // skip connection notification, if any + { + rc = zmq_msg_recv(&msg, zsock, 0); // peerid + assert(rc!=-1); + assert(zmq_msg_more(&msg)); + rcvbytes = zmq_msg_recv(&msg, zsock, 0); + assert(rcvbytes!=-1); + assert(!zmq_msg_more(&msg)); + printf("got %d bytes\n", rcvbytes); + } + + // for this test, we only collect the first chunk + // since the corruption already occurs in the first chunk + memcpy(rcvbuf, zmq_msg_data(&msg), zmq_msg_size(&msg)); + + zmq_msg_close(&msg); + zmq_close(zsock); + close(client_sock); + + zmq_ctx_destroy(zctx); + + assert(rcvbytes >= 4); + printf("%x %x %x %x\n", rcvbuf[0], rcvbuf[1], rcvbuf[2], rcvbuf[3]); + + // notice that only the 1st byte gets corrupted + assert(rcvbuf[3]==0xef); + assert(rcvbuf[2]==0xbe); + assert(rcvbuf[1]==0xad); + assert(rcvbuf[0]==0xde); +} + From 6b9b13be6c298dd5064b133e2460e862ef4fd2d8 Mon Sep 17 00:00:00 2001 From: Jens Auer Date: Mon, 20 Jul 2015 22:34:22 +0200 Subject: [PATCH 084/108] Fixed whitespace error. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index eed71589..c9889e9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -365,7 +365,7 @@ test_apps = \ tests/test_thread_safe \ tests/test_socketopt_hwm \ tests/test_heartbeats \ - tests/test_stream_exceeds_buffer + tests/test_stream_exceeds_buffer tests_test_system_SOURCES = tests/test_system.cpp tests_test_system_LDADD = src/libzmq.la From a88524d388bd68574bca002484ebacb2a6ba33af Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Mon, 20 Jul 2015 19:41:03 -0700 Subject: [PATCH 085/108] Fix test_proxy hanging occasionally by setting ZMQ_LINGER to 0. --- tests/test_proxy.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/test_proxy.cpp b/tests/test_proxy.cpp index 425fb1e1..fe35b768 100644 --- a/tests/test_proxy.cpp +++ b/tests/test_proxy.cpp @@ -62,6 +62,9 @@ client_task (void *ctx) assert (control); int rc = zmq_setsockopt (control, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); + int linger = 0; + rc = zmq_setsockopt (control, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); rc = zmq_connect (control, "inproc://control"); assert (rc == 0); @@ -71,6 +74,9 @@ client_task (void *ctx) sprintf (identity, "%04X-%04X", rand() % 0xFFFF, rand() % 0xFFFF); rc = zmq_setsockopt (client, ZMQ_IDENTITY, identity, ID_SIZE); // includes '\0' as an helper for printf assert (rc == 0); + linger = 0; + rc = zmq_setsockopt (client, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); rc = zmq_connect (client, "tcp://127.0.0.1:5563"); assert (rc == 0); @@ -128,12 +134,17 @@ server_task (void *ctx) // Frontend socket talks to clients over TCP void *frontend = zmq_socket (ctx, ZMQ_ROUTER); assert (frontend); - int rc = zmq_bind (frontend, "tcp://127.0.0.1:5563"); + int linger = 0; + int rc = zmq_setsockopt (frontend, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); + rc = zmq_bind (frontend, "tcp://127.0.0.1:5563"); assert (rc == 0); // Backend socket talks to workers over inproc void *backend = zmq_socket (ctx, ZMQ_DEALER); assert (backend); + rc = zmq_setsockopt (backend, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); rc = zmq_bind (backend, "inproc://backend"); assert (rc == 0); @@ -142,6 +153,8 @@ server_task (void *ctx) assert (control); rc = zmq_setsockopt (control, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); + rc = zmq_setsockopt (control, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); rc = zmq_connect (control, "inproc://control"); assert (rc == 0); @@ -174,7 +187,10 @@ server_worker (void *ctx) { void *worker = zmq_socket (ctx, ZMQ_DEALER); assert (worker); - int rc = zmq_connect (worker, "inproc://backend"); + int linger = 0; + int rc = zmq_setsockopt (worker, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); + rc = zmq_connect (worker, "inproc://backend"); assert (rc == 0); // Control socket receives terminate command from main over inproc @@ -182,6 +198,8 @@ server_worker (void *ctx) assert (control); rc = zmq_setsockopt (control, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); + rc = zmq_setsockopt (control, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); rc = zmq_connect (control, "inproc://control"); assert (rc == 0); @@ -237,7 +255,10 @@ int main (void) // Control socket receives terminate command from main over inproc void *control = zmq_socket (ctx, ZMQ_PUB); assert (control); - int rc = zmq_bind (control, "inproc://control"); + int linger = 0; + int rc = zmq_setsockopt (control, ZMQ_LINGER, &linger, sizeof (linger)); + assert (rc == 0); + rc = zmq_bind (control, "inproc://control"); assert (rc == 0); void *threads [QT_CLIENTS + 1]; From 18791f2bfbd925ad6689c624dc0e18fae919c7c8 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 21 Jul 2015 19:42:20 -0700 Subject: [PATCH 086/108] Fix several missing msg_t::close calls. I traced memory leaks found using AddressSanitizer down to these. --- src/stream.cpp | 2 ++ tests/test_client_server.cpp | 5 +++++ tests/test_srcfd.cpp | 3 +++ tests/test_stream_disconnect.cpp | 8 ++++++++ 4 files changed, 18 insertions(+) diff --git a/src/stream.cpp b/src/stream.cpp index 6ed9dd77..e8ce1b09 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -229,6 +229,8 @@ int zmq::stream_t::xrecv (msg_t *msg_) // Rather than sendig this frame, we keep it in prefetched // buffer and send a frame with peer's ID. blob_t identity = pipe->get_identity (); + rc = msg_->close(); + errno_assert (rc == 0); rc = msg_->init_size (identity.size ()); errno_assert (rc == 0); diff --git a/tests/test_client_server.cpp b/tests/test_client_server.cpp index 8793eeac..155232ea 100644 --- a/tests/test_client_server.cpp +++ b/tests/test_client_server.cpp @@ -56,6 +56,8 @@ int main (void) rc = zmq_msg_send(&msg, client, 0); assert (rc == 1); + rc = zmq_msg_init(&msg); + assert (rc == 0); rc = zmq_msg_recv(&msg, server, 0); assert (rc == 1); @@ -80,6 +82,9 @@ int main (void) rc = zmq_msg_recv(&msg, client, 0); assert (rc == 1); + rc = zmq_msg_close(&msg); + assert (rc == 0); + rc = zmq_close (server); assert (rc == 0); diff --git a/tests/test_srcfd.cpp b/tests/test_srcfd.cpp index 04d03691..faf2f2f8 100644 --- a/tests/test_srcfd.cpp +++ b/tests/test_srcfd.cpp @@ -75,6 +75,9 @@ int main (void) int srcFd = zmq_msg_get(&msg, ZMQ_SRCFD); assert(srcFd >= 0); + rc = zmq_msg_close(&msg); + assert (rc == 0); + // get the remote endpoint struct sockaddr_storage ss; #ifdef ZMQ_HAVE_HPUX diff --git a/tests/test_stream_disconnect.cpp b/tests/test_stream_disconnect.cpp index 7d354a00..0c56328f 100644 --- a/tests/test_stream_disconnect.cpp +++ b/tests/test_stream_disconnect.cpp @@ -91,6 +91,8 @@ int main(int, char**) assert (rc != -1); assert(zmq_msg_size (&peer_frame) > 0); assert (has_more (sockets [SERVER])); + rc = zmq_msg_close (&peer_frame); + assert (rc == 0); // Server: Grab the 2nd frame (actual payload). zmq_msg_t data_frame; @@ -99,6 +101,8 @@ int main(int, char**) rc = zmq_msg_recv (&data_frame, sockets [SERVER], 0); assert (rc != -1); assert(zmq_msg_size (&data_frame) == 0); + rc = zmq_msg_close (&data_frame); + assert (rc == 0); // Client: Grab the 1st frame (peer identity). rc = zmq_msg_init (&peer_frame); @@ -107,6 +111,8 @@ int main(int, char**) assert (rc != -1); assert(zmq_msg_size (&peer_frame) > 0); assert (has_more (sockets [CLIENT])); + rc = zmq_msg_close (&peer_frame); + assert (rc == 0); // Client: Grab the 2nd frame (actual payload). rc = zmq_msg_init (&data_frame); @@ -114,6 +120,8 @@ int main(int, char**) rc = zmq_msg_recv (&data_frame, sockets [CLIENT], 0); assert (rc != -1); assert(zmq_msg_size (&data_frame) == 0); + rc = zmq_msg_close (&data_frame); + assert (rc == 0); // Send initial message. char blob_data [256]; From 708353a1b9d97c0465d2ba684cf81121676d8633 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Wed, 22 Jul 2015 21:19:22 +0800 Subject: [PATCH 087/108] advance refcnt only if it was used --- src/decoder_allocators.hpp | 9 +++++++-- src/raw_decoder.cpp | 3 ++- src/v2_decoder.cpp | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/decoder_allocators.hpp b/src/decoder_allocators.hpp index 25e90e7f..e98ffb36 100644 --- a/src/decoder_allocators.hpp +++ b/src/decoder_allocators.hpp @@ -132,9 +132,14 @@ namespace zmq bufsize = new_size; } - zmq::atomic_counter_t* create_refcnt () + zmq::atomic_counter_t* provide_refcnt () { - return msg_refcnt++; + return msg_refcnt; + } + + void advance_refcnt () + { + msg_refcnt++; } private: diff --git a/src/raw_decoder.cpp b/src/raw_decoder.cpp index 125d9ba5..f690f9c7 100644 --- a/src/raw_decoder.cpp +++ b/src/raw_decoder.cpp @@ -63,11 +63,12 @@ int zmq::raw_decoder_t::decode (const uint8_t *data_, size_t size_, int rc = in_progress.init ((unsigned char*)data_, size_, shared_message_memory_allocator::call_dec_ref, allocator.buffer(), - allocator.create_refcnt() ); + allocator.provide_refcnt() ); // if the buffer serves as memory for a zero-copy message, release it // and allocate a new buffer in get_buffer for the next decode if (in_progress.is_zcmsg()) { + allocator.advance_refcnt(); allocator.release(); } diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 557fb7d3..0cec24e0 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -129,11 +129,12 @@ int zmq::v2_decoder_t::size_ready(uint64_t msg_size, unsigned char const* read_p // if the message will be a large message, pass a valid refcnt memory location as well rc = in_progress.init( (unsigned char*)read_pos, msg_size, shared_message_memory_allocator::call_dec_ref, buffer(), - create_refcnt() ); + provide_refcnt() ); // For small messages, data has been copied and refcount does not have to be increased if (in_progress.is_zcmsg()) { + advance_refcnt(); inc_ref(); } } From 773a06fc23526934e386875744ddbbb2413c2051 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Wed, 22 Jul 2015 11:18:48 -0700 Subject: [PATCH 088/108] Fix memory leak when creating a socket fails. Previously, AddressSanitizer flagged leaks when running tests/test_many_sockets.cpp. --- src/signaler.cpp | 39 ++++++++++++++++++++++++--------------- src/socket_base.cpp | 5 ++++- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/signaler.cpp b/src/signaler.cpp index e6fa9833..52f08bed 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -133,28 +133,37 @@ zmq::signaler_t::signaler_t () #endif } +// This might get run after some part of construction failed, leaving one or +// both of r and w retired_fd. zmq::signaler_t::~signaler_t () { #if defined ZMQ_HAVE_EVENTFD + if (r == retired_fd) return; int rc = close_wait_ms (r); errno_assert (rc == 0); #elif defined ZMQ_HAVE_WINDOWS - const struct linger so_linger = { 1, 0 }; - int rc = setsockopt (w, SOL_SOCKET, SO_LINGER, - (const char *) &so_linger, sizeof so_linger); - // Only check shutdown if WSASTARTUP was previously done - if (rc == 0 || WSAGetLastError () != WSANOTINITIALISED) { - wsa_assert (rc != SOCKET_ERROR); - rc = closesocket (w); - wsa_assert (rc != SOCKET_ERROR); - rc = closesocket (r); - wsa_assert (rc != SOCKET_ERROR); - } + if (w != retired_fd) { + const struct linger so_linger = { 1, 0 }; + int rc = setsockopt (w, SOL_SOCKET, SO_LINGER, + (const char *) &so_linger, sizeof so_linger); + // Only check shutdown if WSASTARTUP was previously done + if (rc == 0 || WSAGetLastError () != WSANOTINITIALISED) { + wsa_assert (rc != SOCKET_ERROR); + rc = closesocket (w); + wsa_assert (rc != SOCKET_ERROR); + if (r == retired_fd) return; + rc = closesocket (r); + wsa_assert (rc != SOCKET_ERROR); + } #else - int rc = close_wait_ms (w); - errno_assert (rc == 0); - rc = close_wait_ms (r); - errno_assert (rc == 0); + if (w != retired_fd) { + int rc = close_wait_ms (w); + errno_assert (rc == 0); + } + if (r != retired_fd) { + rc = close_wait_ms (r); + errno_assert (rc == 0); + } #endif } diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 79044b1a..5606c9b7 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -154,8 +154,11 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, mailbox_t *mailbox = dynamic_cast (s->mailbox); - if (mailbox != NULL && mailbox->get_fd () == retired_fd) + if (mailbox != NULL && mailbox->get_fd () == retired_fd) { + s->destroyed = true; + delete s; return NULL; + } return s; } From e2be0d25bd9e826efa051fe8c90db8864f88ebbe Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 22 Jul 2015 21:31:48 +0200 Subject: [PATCH 089/108] Fix compilation on mac. --- src/signaler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signaler.cpp b/src/signaler.cpp index 52f08bed..6a04da07 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -161,7 +161,7 @@ zmq::signaler_t::~signaler_t () errno_assert (rc == 0); } if (r != retired_fd) { - rc = close_wait_ms (r); + int rc = close_wait_ms (r); errno_assert (rc == 0); } #endif From 91877a22d7bad83ace3dc3246ef1693db92819df Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Thu, 23 Jul 2015 08:49:03 +0100 Subject: [PATCH 090/108] Fix windows build --- src/signaler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/signaler.cpp b/src/signaler.cpp index 6a04da07..1b25ea31 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -155,6 +155,7 @@ zmq::signaler_t::~signaler_t () rc = closesocket (r); wsa_assert (rc != SOCKET_ERROR); } + } #else if (w != retired_fd) { int rc = close_wait_ms (w); From ec5592db1f87cd18e61545be4a3a3174709736dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?= Date: Tue, 21 Jul 2015 23:35:50 +0100 Subject: [PATCH 091/108] Fix 1478: receive unsubscriptions in XPUB when verbose Fixes not receiving unsubscription messages in XPUB socket with ZMQ_XPUB_VERBOSE and using a XSUB-XPUB proxy in front. This adds two modifications: - It adds a new flag, ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, to enable verbose unsubscription messages, necessary when using a XSUB/XPUB proxy. - It adds a boolean switch to zmq::mtrie_t::rm () to control if the callback is invoked every time or only in the last removal. Necessary when a pipe is terminated and the verbose mode for unsubscriptions is enabled. --- doc/zmq_setsockopt.txt | 24 ++++++++++++++++++++++-- include/zmq.h | 1 + src/mtrie.cpp | 23 ++++++++++++++--------- src/mtrie.hpp | 9 +++++---- src/xpub.cpp | 21 ++++++++++++++------- src/xpub.hpp | 6 +++++- 6 files changed, 61 insertions(+), 23 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 903e9761..61392959 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -14,8 +14,9 @@ SYNOPSIS Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_LINGER, ZMQ_ROUTER_HANDOVER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, -ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, ZMQ_REQ_RELAXED, ZMQ_SNDHWM -and ZMQ_RCVHWM, only take effect for subsequent socket bind/connects. +ZMQ_XPUB_VERBOSE, ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, ZMQ_REQ_CORRELATE, +ZMQ_REQ_RELAXED, ZMQ_SNDHWM and ZMQ_RCVHWM, only take effect for +subsequent socket bind/connects. Specifically, security options take effect for subsequent bind/connect calls, and can be changed at any time to affect subsequent binds and/or connects. @@ -839,6 +840,25 @@ Default value:: 0 Applicable socket types:: ZMQ_XPUB +ZMQ_XPUB_VERBOSE_UNSUBSCRIBE: provide all unsubscription messages on XPUB sockets +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Sets the 'XPUB' socket behaviour on new subscriptions and unsubscriptions. +A value of '0' is the default and passes only the last unsubscription message to +upstream. A value of '1' passes all unsubscription messages upstream. + +This behaviour should be enabled in all the intermediary XPUB sockets if +ZMQ_XPUB_VERBOSE is also being used in order to allow the correct forwarding +of all the unsubscription messages. + +NOTE: This behaviour only takes effect when ZMQ_XPUB_VERBOSE is also enabled. + +[horizontal] +Option value type:: int +Option value unit:: 0, 1 +Default value:: 0 +Applicable socket types:: ZMQ_XPUB + + ZMQ_XPUB_MANUAL: change the subscription handling to manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the 'XPUB' socket subscription handling mode manual/automatic. diff --git a/include/zmq.h b/include/zmq.h index 0eb31f7a..aaf3d55e 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -319,6 +319,7 @@ ZMQ_EXPORT uint32_t zmq_msg_get_routing_id(zmq_msg_t *msg); #define ZMQ_HEARTBEAT_IVL 75 #define ZMQ_HEARTBEAT_TTL 76 #define ZMQ_HEARTBEAT_TIMEOUT 77 +#define ZMQ_XPUB_VERBOSE_UNSUBSCRIBE 78 /* Message options */ #define ZMQ_MORE 1 diff --git a/src/mtrie.cpp b/src/mtrie.cpp index 6f7c5898..3fa3971d 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -159,23 +159,28 @@ bool zmq::mtrie_t::add_helper (unsigned char *prefix_, size_t size_, void zmq::mtrie_t::rm (pipe_t *pipe_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), - void *arg_) + void *arg_, bool call_on_uniq_) { unsigned char *buff = NULL; - rm_helper (pipe_, &buff, 0, 0, func_, arg_); + rm_helper (pipe_, &buff, 0, 0, func_, arg_, call_on_uniq_); free (buff); } void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), - void *arg_) + void *arg_, bool call_on_uniq_) { // Remove the subscription from this node. - if (pipes && pipes->erase (pipe_) && pipes->empty ()) { - func_ (*buff_, buffsize_, arg_); - delete pipes; - pipes = 0; + if (pipes && pipes->erase (pipe_)) { + if (!call_on_uniq_ || pipes->empty ()) { + func_ (*buff_, buffsize_, arg_); + } + + if (pipes->empty ()) { + delete pipes; + pipes = 0; + } } // Adjust the buffer. @@ -194,7 +199,7 @@ void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_, (*buff_) [buffsize_] = min; buffsize_++; next.node->rm_helper (pipe_, buff_, buffsize_, maxbuffsize_, - func_, arg_); + func_, arg_, call_on_uniq_); // Prune the node if it was made redundant by the removal if (next.node->is_redundant ()) { @@ -217,7 +222,7 @@ void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_, (*buff_) [buffsize_] = min + c; if (next.table [c]) { next.table [c]->rm_helper (pipe_, buff_, buffsize_ + 1, - maxbuffsize_, func_, arg_); + maxbuffsize_, func_, arg_, call_on_uniq_); // Prune redundant nodes from the mtrie if (next.table [c]->is_redundant ()) { diff --git a/src/mtrie.hpp b/src/mtrie.hpp index 6d49380c..55279303 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -54,11 +54,12 @@ namespace zmq bool add (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); // Remove all subscriptions for a specific peer from the trie. - // If there are no subscriptions left on some topics, invoke the - // supplied callback function. + // The call_on_uniq_ flag controls if the callback is invoked + // when there are no subscriptions left on some topics or on + // every removal. void rm (zmq::pipe_t *pipe_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), - void *arg_); + void *arg_, bool call_on_uniq_); // Remove specific subscription from the trie. Return true is it was // actually removed rather than de-duplicated. @@ -75,7 +76,7 @@ namespace zmq void rm_helper (zmq::pipe_t *pipe_, unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), - void *arg_); + void *arg_, bool call_on_uniq_); bool rm_helper (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); bool is_redundant () const; diff --git a/src/xpub.cpp b/src/xpub.cpp index fd086e9e..a5ec28ce 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -36,7 +36,8 @@ zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), - verbose (false), + verbose_subs (false), + verbose_unsubs (false), more (false), lossy (true), manual(false), @@ -101,9 +102,11 @@ void zmq::xpub_t::xread_activated (pipe_t *pipe_) else unique = subscriptions.add(data + 1, size - 1, pipe_); - // If the subscription is not a duplicate store it so that it can be - // passed to used on next recv call. (Unsubscribe is not verbose.) - if (options.type == ZMQ_XPUB && (unique || (*data && verbose))) { + // If the (un)subscription is not a duplicate store it so that it can be + // passed to the user on next recv call unless verbose mode is enabled + // which makes to pass always these messages. + if (options.type == ZMQ_XPUB && (unique || (*data == 1 && verbose_subs) || + (*data == 0 && verbose_unsubs && verbose_subs))) { pending_data.push_back(blob_t(data, size)); pending_flags.push_back(0); } @@ -126,7 +129,8 @@ void zmq::xpub_t::xwrite_activated (pipe_t *pipe_) int zmq::xpub_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { - if (option_ == ZMQ_XPUB_VERBOSE || option_ == ZMQ_XPUB_NODROP || option_ == ZMQ_XPUB_MANUAL) + if (option_ == ZMQ_XPUB_VERBOSE || option_ == ZMQ_XPUB_VERBOSE_UNSUBSCRIBE || + option_ == ZMQ_XPUB_NODROP || option_ == ZMQ_XPUB_MANUAL) { if (optvallen_ != sizeof(int) || *static_cast (optval_) < 0) { errno = EINVAL; @@ -134,7 +138,10 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_, } if (option_ == ZMQ_XPUB_VERBOSE) - verbose = (*static_cast (optval_) != 0); + verbose_subs = (*static_cast (optval_) != 0); + else + if (option_ == ZMQ_XPUB_VERBOSE_UNSUBSCRIBE) + verbose_unsubs = (*static_cast (optval_) != 0); else if (option_ == ZMQ_XPUB_NODROP) lossy = (*static_cast (optval_) == 0); @@ -173,7 +180,7 @@ void zmq::xpub_t::xpipe_terminated (pipe_t *pipe_) // Remove the pipe from the trie. If there are topics that nobody // is interested in anymore, send corresponding unsubscriptions // upstream. - subscriptions.rm (pipe_, send_unsubscription, this); + subscriptions.rm (pipe_, send_unsubscription, this, !verbose_unsubs); dist.pipe_terminated (pipe_); } diff --git a/src/xpub.hpp b/src/xpub.hpp index 261cac44..4be7af5f 100644 --- a/src/xpub.hpp +++ b/src/xpub.hpp @@ -84,7 +84,11 @@ namespace zmq // If true, send all subscription messages upstream, not just // unique ones - bool verbose; + bool verbose_subs; + + // If true, send all unsubscription messages upstream, not just + // unique ones + bool verbose_unsubs; // True if we are in the middle of sending a multi-part message. bool more; From 518b939f316510998cb62271ffe3df219d23725f Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Fri, 24 Jul 2015 05:12:11 +0800 Subject: [PATCH 092/108] make ZMQ_STREAM_NOTIFY also control disconnect notificatons --- doc/zmq_setsockopt.txt | 10 +++++----- src/stream_engine.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 61392959..4ace7910 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -716,11 +716,11 @@ Default value:: -1 (infinite) Applicable socket types:: all -ZMQ_STREAM_NOTIFY: send connect notifications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Enables connect notifications on a STREAM socket, when set to 1. By default a -STREAM socket does not notify new connections. When notifications are enabled, -it delivers a zero-length message to signal new client connections. +ZMQ_STREAM_NOTIFY: send connect and disconnect notifications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Enables connect and disconnect notifications on a STREAM socket, when set +to 1. When notifications are enabled, the socket delivers a zero-length +message when a peer connects or disconnects. [horizontal] Option value type:: int diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 96b6bde6..17c3d52c 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -965,7 +965,7 @@ int zmq::stream_engine_t::write_subscription_msg (msg_t *msg_) void zmq::stream_engine_t::error (error_reason_t reason) { - if (options.raw_socket) { + if (options.raw_socket && options.raw_notify) { // For raw sockets, send a final 0-length message to the application // so that it knows the peer has been disconnected. msg_t terminator; From 3e7d73736093b5e9608ef74890d5f1772b4631fe Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Fri, 24 Jul 2015 05:20:31 +0800 Subject: [PATCH 093/108] change ZMQ_STREAM_NOTIFY to default to 1 --- doc/zmq_setsockopt.txt | 2 +- src/options.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 4ace7910..1d48f3f8 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -725,7 +725,7 @@ message when a peer connects or disconnects. [horizontal] Option value type:: int Option value unit:: 0, 1 -Default value:: 0 +Default value:: 1 Applicable socket types:: ZMQ_STREAM diff --git a/src/options.cpp b/src/options.cpp index da86c3fb..6d4d000d 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -58,7 +58,7 @@ zmq::options_t::options_t () : invert_matching(false), recv_identity (false), raw_socket (false), - raw_notify (false), + raw_notify (true), tcp_keepalive (-1), tcp_keepalive_cnt (-1), tcp_keepalive_idle (-1), From fd51b0e508172ec8b99b0785c4d7ab13e9b5f220 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Fri, 24 Jul 2015 05:39:47 +0800 Subject: [PATCH 094/108] update test that relied on connect notifications to be disabled --- tests/test_connect_rid.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_connect_rid.cpp b/tests/test_connect_rid.cpp index 0dd24512..7b2c092e 100644 --- a/tests/test_connect_rid.cpp +++ b/tests/test_connect_rid.cpp @@ -36,12 +36,15 @@ void test_stream_2_stream(){ char buff[256]; char msg[] = "hi 1"; const char *bindip = "tcp://127.0.0.1:5556"; + int disabled = 0; int zero = 0; void *ctx = zmq_ctx_new (); // Set up listener STREAM. rbind = zmq_socket (ctx, ZMQ_STREAM); assert (rbind); + ret = zmq_setsockopt (rbind, ZMQ_STREAM_NOTIFY, &disabled, sizeof (disabled)); + assert (ret == 0); ret = zmq_setsockopt (rbind, ZMQ_LINGER, &zero, sizeof (zero)); assert (0 == ret); ret = zmq_bind (rbind, bindip); From 2182bc963d2e0fc12a94adfdf92c7b31d593074e Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 25 Jul 2015 17:46:46 +0800 Subject: [PATCH 095/108] check for potential unsigned integer wraparound before adding --- src/msg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/msg.cpp b/src/msg.cpp index 07ce88e4..d8519f32 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -103,8 +103,9 @@ int zmq::msg_t::init_size (size_t size_) u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.routing_id = 0; - u.lmsg.content = - (content_t*) malloc (sizeof (content_t) + size_); + u.lmsg.content = NULL; + if (sizeof (content_t) + size_ > size_) + u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_); if (unlikely (!u.lmsg.content)) { errno = ENOMEM; return -1; From 342c417f9dfd095701cb033d71e7041406a7f152 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 26 Jul 2015 17:37:18 -0700 Subject: [PATCH 096/108] Add decoder_allocators to VS builds. --- builds/msvc/vs2010/libzmq/libzmq.vcxproj | 2 ++ builds/msvc/vs2010/libzmq/libzmq.vcxproj.filters | 6 ++++++ builds/msvc/vs2012/libzmq/libzmq.vcxproj | 2 ++ builds/msvc/vs2012/libzmq/libzmq.vcxproj.filters | 6 ++++++ builds/msvc/vs2013/libzmq/libzmq.vcxproj | 2 ++ builds/msvc/vs2013/libzmq/libzmq.vcxproj.filters | 6 ++++++ 6 files changed, 24 insertions(+) diff --git a/builds/msvc/vs2010/libzmq/libzmq.vcxproj b/builds/msvc/vs2010/libzmq/libzmq.vcxproj index 79fbfa68..1cf30f7d 100644 --- a/builds/msvc/vs2010/libzmq/libzmq.vcxproj +++ b/builds/msvc/vs2010/libzmq/libzmq.vcxproj @@ -82,6 +82,7 @@ + @@ -168,6 +169,7 @@ + diff --git a/builds/msvc/vs2010/libzmq/libzmq.vcxproj.filters b/builds/msvc/vs2010/libzmq/libzmq.vcxproj.filters index 18a165b6..8740348e 100644 --- a/builds/msvc/vs2010/libzmq/libzmq.vcxproj.filters +++ b/builds/msvc/vs2010/libzmq/libzmq.vcxproj.filters @@ -235,6 +235,9 @@ src + + src + @@ -513,6 +516,9 @@ src\include + + src\include + diff --git a/builds/msvc/vs2012/libzmq/libzmq.vcxproj b/builds/msvc/vs2012/libzmq/libzmq.vcxproj index aeecf107..c3cad9cf 100644 --- a/builds/msvc/vs2012/libzmq/libzmq.vcxproj +++ b/builds/msvc/vs2012/libzmq/libzmq.vcxproj @@ -82,6 +82,7 @@ + @@ -168,6 +169,7 @@ + diff --git a/builds/msvc/vs2012/libzmq/libzmq.vcxproj.filters b/builds/msvc/vs2012/libzmq/libzmq.vcxproj.filters index 18a165b6..8740348e 100644 --- a/builds/msvc/vs2012/libzmq/libzmq.vcxproj.filters +++ b/builds/msvc/vs2012/libzmq/libzmq.vcxproj.filters @@ -235,6 +235,9 @@ src + + src + @@ -513,6 +516,9 @@ src\include + + src\include + diff --git a/builds/msvc/vs2013/libzmq/libzmq.vcxproj b/builds/msvc/vs2013/libzmq/libzmq.vcxproj index 5a464a30..5648295a 100644 --- a/builds/msvc/vs2013/libzmq/libzmq.vcxproj +++ b/builds/msvc/vs2013/libzmq/libzmq.vcxproj @@ -82,6 +82,7 @@ + @@ -168,6 +169,7 @@ + diff --git a/builds/msvc/vs2013/libzmq/libzmq.vcxproj.filters b/builds/msvc/vs2013/libzmq/libzmq.vcxproj.filters index 18a165b6..8740348e 100644 --- a/builds/msvc/vs2013/libzmq/libzmq.vcxproj.filters +++ b/builds/msvc/vs2013/libzmq/libzmq.vcxproj.filters @@ -235,6 +235,9 @@ src + + src + @@ -513,6 +516,9 @@ src\include + + src\include + From 6f0efc092caf0dd6792a32560ad5455c9b96cfde Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 26 Jul 2015 17:37:28 -0700 Subject: [PATCH 097/108] Make lossy cast explicit. --- src/decoder_allocators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoder_allocators.cpp b/src/decoder_allocators.cpp index f122e792..7480d402 100644 --- a/src/decoder_allocators.cpp +++ b/src/decoder_allocators.cpp @@ -38,7 +38,7 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator (std::size bufsize(0), max_size(bufsize_), msg_refcnt(NULL), - maxCounters (std::ceil (static_cast (max_size) / static_cast (msg_t::max_vsm_size))) + maxCounters (static_cast (std::ceil (static_cast (max_size) / static_cast (msg_t::max_vsm_size)))) { } From 81aa6f45a443af2e0dee87b5d507cd7c0d5f42d3 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 26 Jul 2015 17:37:38 -0700 Subject: [PATCH 098/108] Style and explicitness. --- src/err.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/err.cpp b/src/err.cpp index bf9f88a0..766c767c 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -212,13 +212,13 @@ void zmq::win_error (char *buffer_, size_t buffer_size_) { DWORD errcode = GetLastError (); #if defined _WIN32_WCE - DWORD rc = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | + DWORD rc = FormatMessageW (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, - SUBLANG_DEFAULT), (LPWSTR)buffer_, buffer_size_ / sizeof(wchar_t), NULL ); + SUBLANG_DEFAULT), (LPWSTR)buffer_, buffer_size_ / sizeof(wchar_t), NULL); #else DWORD rc = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, - SUBLANG_DEFAULT), buffer_, (DWORD) buffer_size_, NULL ); + SUBLANG_DEFAULT), buffer_, (DWORD) buffer_size_, NULL); #endif zmq_assert (rc); } From cb0491ca1870eeea78ca7442a29e58233c8cf6ea Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:37:16 -0700 Subject: [PATCH 099/108] Add a way to disable libzmq's internal test timeout. It's nice to be able to disable libzmq's internal timeout when there's another timeout in the test runner being used which gives nicer error messages. --- tests/testutil.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testutil.hpp b/tests/testutil.hpp index e66d4706..f334e89c 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -282,8 +282,10 @@ void setup_test_environment() // abort test after 121 seconds alarm(121); #else +# if !defined ZMQ_DISABLE_TEST_TIMEOUT // abort test after 60 seconds alarm(60); +# endif #endif #endif #if defined __MVS__ From f86bded783324aabd6b4330cc125b3c583444417 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:42:24 -0700 Subject: [PATCH 100/108] Increase sleep in test to fix flakiness under CPU load. --- tests/test_thread_safe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_thread_safe.cpp b/tests/test_thread_safe.cpp index 2f8cb2f8..dee9830a 100644 --- a/tests/test_thread_safe.cpp +++ b/tests/test_thread_safe.cpp @@ -110,7 +110,7 @@ void worker1(void* s) if (c == 0) { - msleep(10); + msleep(100); rc = zmq_send_const(s,&worker_id, 1, 0); assert(rc == 1); } @@ -136,7 +136,7 @@ void worker2(void* s) if (c == 0) { - msleep(10); + msleep(100); rc = zmq_send_const(s,&worker_id, 1, 0); assert(rc == 1); } From 97969808f6d3c5d97850cea477229fde87aab4ad Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:43:30 -0700 Subject: [PATCH 101/108] Fix a documented memory leak. Despite the old comments, re-initing the msg_t leaks a refcount to metadata in some situations. v1_decoder looks like it isn't tested any more, but it seems like a good idea to fix it because it has the exact same piece of buggy code v2_decoder does. --- src/v1_decoder.cpp | 14 ++++++-------- src/v2_decoder.cpp | 6 ++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/v1_decoder.cpp b/src/v1_decoder.cpp index 508f3210..10b8c3f7 100644 --- a/src/v1_decoder.cpp +++ b/src/v1_decoder.cpp @@ -80,10 +80,9 @@ int zmq::v1_decoder_t::one_byte_size_ready (unsigned char const*) return -1; } - // in_progress is initialised at this point so in theory we should - // close it before calling zmq_msg_init_size, however, it's a 0-byte - // message and thus we can treat it as uninitialised... - int rc = in_progress.init_size (*tmpbuf - 1); + int rc = in_progress.close(); + assert(rc == 0); + rc = in_progress.init_size (*tmpbuf - 1); if (rc != 0) { errno_assert (errno == ENOMEM); rc = in_progress.init (); @@ -123,10 +122,9 @@ int zmq::v1_decoder_t::eight_byte_size_ready (unsigned char const*) const size_t msg_size = static_cast (payload_length - 1); - // in_progress is initialised at this point so in theory we should - // close it before calling init_size, however, it's a 0-byte - // message and thus we can treat it as uninitialised... - int rc = in_progress.init_size (msg_size); + int rc = in_progress.close(); + assert(rc == 0); + rc = in_progress.init_size (msg_size); if (rc != 0) { errno_assert (errno == ENOMEM); rc = in_progress.init (); diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index 0cec24e0..43bd9d60 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -108,10 +108,8 @@ int zmq::v2_decoder_t::size_ready(uint64_t msg_size, unsigned char const* read_p return -1; } - // in_progress is initialised at this point so in theory we should - // close it before calling init_size, however, it's a 0-byte - // message and thus we can treat it as uninitialised. - int rc = -1; + int rc = in_progress.close(); + assert(rc == 0); // the current message can exceed the current buffer. We have to copy the buffer // data into a new message and complete it in the next receive. From e449d7bfbdd29ede7ead251926fe2219e8ba5e7e Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:42:46 -0700 Subject: [PATCH 102/108] Fix test flakiness. I'm pretty sure this is an issue with the test being too picky and not a bug, but the behavior in this situation is not well documented. --- tests/test_monitor.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_monitor.cpp b/tests/test_monitor.cpp index 8d19426a..42017f8c 100644 --- a/tests/test_monitor.cpp +++ b/tests/test_monitor.cpp @@ -125,9 +125,14 @@ int main (void) event = get_monitor_event (server_mon, NULL, NULL); assert (event == ZMQ_EVENT_ACCEPTED); event = get_monitor_event (server_mon, NULL, NULL); - assert (event == ZMQ_EVENT_CLOSED); - event = get_monitor_event (server_mon, NULL, NULL); - assert (event == ZMQ_EVENT_MONITOR_STOPPED); + // Sometimes the server sees the client closing before it gets closed. + if (event != ZMQ_EVENT_DISCONNECTED) { + assert (event == ZMQ_EVENT_CLOSED); + event = get_monitor_event (server_mon, NULL, NULL); + } + if (event != ZMQ_EVENT_DISCONNECTED) { + assert (event == ZMQ_EVENT_MONITOR_STOPPED); + } // Close down the sockets close_zero_linger (client_mon); From 62a0e450895cb5809d182908255c3110e8036dc0 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:38:58 -0700 Subject: [PATCH 103/108] Fix eventfd read handling under heavy load. I had the assertion below fail occasionally when running the libzmq tests under heavy CPU load on linux 3.16.0-4-amd64. --- src/signaler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/signaler.cpp b/src/signaler.cpp index 1b25ea31..a212c655 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -291,10 +291,10 @@ void zmq::signaler_t::recv () ssize_t sz = read (r, &dummy, sizeof (dummy)); errno_assert (sz == sizeof (dummy)); - // If we accidentally grabbed the next signal along with the current + // If we accidentally grabbed the next signal(s) along with the current // one, return it back to the eventfd object. - if (unlikely (dummy == 2)) { - const uint64_t inc = 1; + if (unlikely (dummy > 1)) { + const uint64_t inc = dummy - 1; ssize_t sz2 = write (w, &inc, sizeof (inc)); errno_assert (sz2 == sizeof (inc)); return; From c4c5135db6e9531860f538edcd066a50602e88cd Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Tue, 28 Jul 2015 13:35:49 -0700 Subject: [PATCH 104/108] Retry recv if it only returns part of a message during tests. Under linux 3.16.0-4-amd64, I was getting occasional test failures before fixing this. --- tests/test_heartbeats.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp index c5aa060b..6c7ebcb0 100644 --- a/tests/test_heartbeats.cpp +++ b/tests/test_heartbeats.cpp @@ -62,6 +62,18 @@ get_monitor_event (void *monitor) return -1; } +static void +recv_with_retry (int fd, char *buffer, int bytes) { + int received = 0; + while (true) { + int rc = recv(fd, buffer + received, bytes - received, 0); + assert(rc > 0); + received += rc; + assert(received <= bytes); + if (received == bytes) break; + } +} + static void mock_handshake (int fd) { const uint8_t zmtp_greeting[33] = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0x7f, 3, 0, 'N', 'U', 'L', 'L', 0 }; @@ -72,8 +84,7 @@ mock_handshake (int fd) { int rc = send(fd, buffer, 64, 0); assert(rc == 64); - rc = recv(fd, buffer, 64, 0); - assert(rc == 64); + recv_with_retry(fd, buffer, 64); const uint8_t zmtp_ready[43] = { 4, 41, 5, 'R', 'E', 'A', 'D', 'Y', 11, 'S', 'o', 'c', 'k', 'e', 't', '-', 'T', 'y', 'p', 'e', @@ -86,8 +97,7 @@ mock_handshake (int fd) { rc = send(fd, buffer, 43, 0); assert(rc == 43); - rc = recv(fd, buffer, 43, 0); - assert(rc == 43); + recv_with_retry(fd, buffer, 43); } static void From 89fa904b2d753c981710fe6883ecc36ea879cedc Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 31 Jul 2015 00:45:50 +0100 Subject: [PATCH 105/108] Check for libtoolize instead of libtool on Linux autogen.sh has a check for the libtool binary as a mean to check if libtool is available. But distributions like Debian and Ubuntu are splitting the libtool package, and the libtool binary is now in a separate package. What autoconf actually need is not the libtool binary, but libtoolize and other macro files. So check for libtoolize instead. On the other hand, OSX only ships libtool, not libtoolize, and uses a pre-generated libtool script to build. So check for libtoolize first and then for libtool, and fail if neither can be found. --- autogen.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index 52a88128..7af48637 100755 --- a/autogen.sh +++ b/autogen.sh @@ -20,10 +20,14 @@ # Script to generate all required files from fresh git checkout. -command -v libtool >/dev/null 2>&1 +# Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize. +command -v libtoolize >/dev/null 2>&1 if [ $? -ne 0 ]; then - echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 - exit 1 + command -v libtool >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 + exit 1 + fi fi command -v autoreconf >/dev/null 2>&1 From d9f32611adcb2a3c2c46748b16056def10391192 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 1 Aug 2015 06:29:06 +0800 Subject: [PATCH 106/108] ZMQ_TCP_KEEPALIVE_IDLE doc wrongly says it overrides TCP_KEEPCNT --- doc/zmq_setsockopt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 1d48f3f8..26c424b9 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -772,9 +772,9 @@ Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. -ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT (or TCP_KEEPALIVE on some OS) +ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPIDLE (or TCP_KEEPALIVE on some OS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Override 'TCP_KEEPCNT' (or 'TCP_KEEPALIVE' on some OS) socket option (where +Override 'TCP_KEEPIDLE' (or 'TCP_KEEPALIVE' on some OS) socket option (where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. From 94c579a6c0bdd9488140ba8d8f76e4ec48378720 Mon Sep 17 00:00:00 2001 From: Joe Eli McIlvain Date: Fri, 31 Jul 2015 22:36:57 -0700 Subject: [PATCH 107/108] Fix title of docs for `ZMQ_XPUB_WELCOME_MSG` socket option. --- doc/zmq_setsockopt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 26c424b9..41da9a9b 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -890,8 +890,8 @@ Default value:: 0 Applicable socket types:: ZMQ_XPUB, ZMQ_PUB -ZMQ_WELCOME_MSG: set welcome message that will be received by subscriber when connecting -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ZMQ_XPUB_WELCOME_MSG: set welcome message that will be received by subscriber when connecting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets a welcome message the will be recieved by subscriber when connecting. Subscriber must subscribe to the Welcome message before connecting. Welcome message will also be sent on reconnecting. From 6d0cea54aa629fd94172daeda7d2aafcecd0cbdb Mon Sep 17 00:00:00 2001 From: Joe Eli McIlvain Date: Fri, 31 Jul 2015 22:37:36 -0700 Subject: [PATCH 108/108] Fix alphabetical order of non-deprecated setsockopt docs. --- doc/zmq_setsockopt.txt | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 41da9a9b..13918956 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -329,6 +329,28 @@ Default value:: 0 (false) Applicable socket types:: all, only for connection-oriented transports. +ZMQ_INVERT_MATCHING: Invert message filtering +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Reverses the filtering behavior of PUB-SUB sockets, when set to 1. + +On 'PUB' and 'XPUB' sockets, this causes messages to be sent to all +connected sockets 'except' those subscribed to a prefix that matches +the message. On 'SUB' sockets, this causes only incoming messages that +do 'not' match any of the socket's subscriptions to be received by the user. + +Whenever 'ZMQ_INVERT_MATCHING' is set to 1 on a 'PUB' socket, all 'SUB' +sockets connecting to it must also have the option set to 1. Failure to +do so will have the 'SUB' sockets reject everything the 'PUB' socket sends +them. 'XSUB' sockets do not need to do this because they do not filter +incoming messages. + +[horizontal] +Option value type:: int +Option value unit:: 0,1 +Default value:: 0 +Applicable socket types:: ZMQ_PUB, ZMQ_XPUB, ZMQ_SUB + + ZMQ_IPV6: Enable IPv6 on socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set the IPv6 option for the socket. A value of `1` means IPv6 is @@ -1020,28 +1042,6 @@ Default value:: 1 (true) Applicable socket types:: all, when using TCP transports. -ZMQ_INVERT_MATCHING: Invert message filtering -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Reverses the filtering behavior of PUB-SUB sockets, when set to 1. - -On 'PUB' and 'XPUB' sockets, this causes messages to be sent to all -connected sockets 'except' those subscribed to a prefix that matches -the message. On 'SUB' sockets, this causes only incoming messages that -do 'not' match any of the socket's subscriptions to be received by the user. - -Whenever 'ZMQ_INVERT_MATCHING' is set to 1 on a 'PUB' socket, all 'SUB' -sockets connecting to it must also have the option set to 1. Failure to -do so will have the 'SUB' sockets reject everything the 'PUB' socket sends -them. 'XSUB' sockets do not need to do this because they do not filter -incoming messages. - -[horizontal] -Option value type:: int -Option value unit:: 0,1 -Default value:: 0 -Applicable socket types:: ZMQ_PUB, ZMQ_XPUB, ZMQ_SUB - - RETURN VALUE ------------ The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it