diff --git a/Makefile.am b/Makefile.am index abe13e38..dce8bc5c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -495,9 +495,6 @@ tests_test_bind_src_address_LDADD = src/libzmq.la tests_test_metadata_SOURCES = tests/test_metadata.cpp tests_test_metadata_LDADD = src/libzmq.la -tests_test_id2fd_SOURCES = tests/test_id2fd.cpp -tests_test_id2fd_LDADD = src/libzmq.la - tests_test_capabilities_SOURCES = tests/test_capabilities.cpp tests_test_capabilities_LDADD = src/libzmq.la diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index b8bb20a2..5213c0ea 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -266,6 +266,29 @@ Default value:: 0 (false) Applicable socket types:: all, primarily when using TCP/IPC transports. +ZMQ_INVERT_MATCHING: Retrieve inverted filtering status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Returns the value of the 'ZMQ_INVERT_MATCHING' option. A value of `1` +means the socket uses inverted prefix matching. + +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_IPV4ONLY: Retrieve IPv4-only socket override status ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the IPv4-only option for the socket. This option is deprecated. diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 1441fad5..52ee0a82 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -670,6 +670,19 @@ 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. + +[horizontal] +Option value type:: int +Option value unit:: 0, 1 +Default value:: 0 +Applicable socket types:: ZMQ_STREAM + + ZMQ_SUBSCRIBE: Establish message filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' @@ -924,6 +937,29 @@ Option value unit:: boolean 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 diff --git a/include/zmq.h b/include/zmq.h index 163fc666..286fd377 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -195,7 +195,10 @@ ZMQ_EXPORT int zmq_ctx_destroy (void *context); /* 0MQ message definition. */ /******************************************************************************/ -typedef struct zmq_msg_t {unsigned char _ [64];} zmq_msg_t; +/* union here ensures correct alignment on architectures that require it, e.g. + * SPARC + */ +typedef union zmq_msg_t {unsigned char _ [64]; void *p; } zmq_msg_t; typedef void (zmq_free_fn) (void *data, void *hint); @@ -286,7 +289,7 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property); #define ZMQ_ZAP_DOMAIN 55 #define ZMQ_ROUTER_HANDOVER 56 #define ZMQ_TOS 57 -#define ZMQ_CONNECT_RID 61 +#define ZMQ_CONNECT_RID 61 #define ZMQ_GSSAPI_SERVER 62 #define ZMQ_GSSAPI_PRINCIPAL 63 #define ZMQ_GSSAPI_SERVICE_PRINCIPAL 64 @@ -297,6 +300,8 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property); #define ZMQ_BLOCKY 70 #define ZMQ_XPUB_MANUAL 71 #define ZMQ_XPUB_WELCOME_MSG 72 +#define ZMQ_STREAM_NOTIFY 73 +#define ZMQ_INVERT_MATCHING 74 /* Message options */ #define ZMQ_MORE 1 diff --git a/include/zmq_utils.h b/include/zmq_utils.h index 61c70497..3392a8e0 100644 --- a/include/zmq_utils.h +++ b/include/zmq_utils.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/address.cpp b/src/address.cpp index 8a321373..0f4b7fd6 100644 --- a/src/address.cpp +++ b/src/address.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/address.hpp b/src/address.hpp index 88faf0b1..1ea72ace 100644 --- a/src/address.hpp +++ b/src/address.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/array.hpp b/src/array.hpp index c12c70ad..5acf834e 100644 --- a/src/array.hpp +++ b/src/array.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index 81536e29..b1f9d9d5 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index 88e36efd..ba456af3 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/blob.hpp b/src/blob.hpp index 943106b4..eebaf68d 100644 --- a/src/blob.hpp +++ b/src/blob.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/clock.cpp b/src/clock.cpp index 07d44b57..97e94fb0 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/clock.hpp b/src/clock.hpp index 372bc82c..4db695f7 100644 --- a/src/clock.hpp +++ b/src/clock.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/command.hpp b/src/command.hpp index 5df50d06..bb3cab2b 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/config.hpp b/src/config.hpp index 91263ebf..fd700a44 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ctx.cpp b/src/ctx.cpp index 2c8fbf13..0867ca61 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ctx.hpp b/src/ctx.hpp index 655da37a..24e5fd1e 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/curve_client.cpp b/src/curve_client.cpp index 77fc420a..70c15e3b 100644 --- a/src/curve_client.cpp +++ b/src/curve_client.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/curve_client.hpp b/src/curve_client.hpp index b5756fbc..73f24500 100644 --- a/src/curve_client.hpp +++ b/src/curve_client.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/curve_server.cpp b/src/curve_server.cpp index 22c32d6d..91b5d6a9 100644 --- a/src/curve_server.cpp +++ b/src/curve_server.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/curve_server.hpp b/src/curve_server.hpp index f736ae4e..1c22a365 100644 --- a/src/curve_server.hpp +++ b/src/curve_server.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dbuffer.hpp b/src/dbuffer.hpp index 9a24dbf1..2b3fc973 100644 --- a/src/dbuffer.hpp +++ b/src/dbuffer.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dealer.cpp b/src/dealer.cpp index 6739c20a..460b4932 100644 --- a/src/dealer.cpp +++ b/src/dealer.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dealer.hpp b/src/dealer.hpp index abcfef63..1e63d64d 100644 --- a/src/dealer.hpp +++ b/src/dealer.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/decoder.hpp b/src/decoder.hpp index 7ac827d6..fd844eee 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/devpoll.cpp b/src/devpoll.cpp index ecb01dcf..fbd8a55f 100644 --- a/src/devpoll.cpp +++ b/src/devpoll.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/devpoll.hpp b/src/devpoll.hpp index 3d7f2d84..dc2a979f 100644 --- a/src/devpoll.hpp +++ b/src/devpoll.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dist.cpp b/src/dist.cpp old mode 100755 new mode 100644 index 794923ec..35cdb445 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -69,6 +69,22 @@ void zmq::dist_t::match (pipe_t *pipe_) matching++; } +void zmq::dist_t::reverse_match () +{ + pipes_t::size_type prev_matching = matching; + + // Reset matching to 0 + unmatch(); + + // Mark all matching pipes as not matching and vice-versa. + // To do this, push all pipes that are eligible but not + // matched - i.e. between "matching" and "eligible" - + // to the beginning of the queue. + for (pipes_t::size_type i = prev_matching; i < eligible; ++i) { + pipes.swap(i, matching++); + } +} + void zmq::dist_t::unmatch () { matching = 0; diff --git a/src/dist.hpp b/src/dist.hpp index 1758f6ba..cff530e7 100644 --- a/src/dist.hpp +++ b/src/dist.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -50,6 +50,9 @@ namespace zmq // will send message also to this pipe. void match (zmq::pipe_t *pipe_); + // Marks all pipes that are not matched as matched and vice-versa. + void reverse_match(); + // Mark all pipes as non-matching. void unmatch (); diff --git a/src/encoder.hpp b/src/encoder.hpp index 56b41246..f4586bd9 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/epoll.cpp b/src/epoll.cpp index 13d970f2..1f029b77 100644 --- a/src/epoll.cpp +++ b/src/epoll.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/epoll.hpp b/src/epoll.hpp index e48f2303..a2be110b 100644 --- a/src/epoll.hpp +++ b/src/epoll.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/err.cpp b/src/err.cpp index 86928c79..6c22add7 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/err.hpp b/src/err.hpp index 4d288e21..ebb0fe19 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/fd.hpp b/src/fd.hpp index a2333e0e..2464b6bf 100644 --- a/src/fd.hpp +++ b/src/fd.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/fq.cpp b/src/fq.cpp index 932503e5..9759131d 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/fq.hpp b/src/fq.hpp index 49f69059..ac4519f7 100644 --- a/src/fq.hpp +++ b/src/fq.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_client.cpp b/src/gssapi_client.cpp index 607af3d0..9c110e03 100644 --- a/src/gssapi_client.cpp +++ b/src/gssapi_client.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_client.hpp b/src/gssapi_client.hpp index b6253921..e01e76bb 100644 --- a/src/gssapi_client.hpp +++ b/src/gssapi_client.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_mechanism_base.cpp b/src/gssapi_mechanism_base.cpp index f9498232..12a7a8f8 100644 --- a/src/gssapi_mechanism_base.cpp +++ b/src/gssapi_mechanism_base.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_mechanism_base.hpp b/src/gssapi_mechanism_base.hpp index 1f402f98..b9429cdc 100644 --- a/src/gssapi_mechanism_base.hpp +++ b/src/gssapi_mechanism_base.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_server.cpp b/src/gssapi_server.cpp index 4c10a392..08840110 100644 --- a/src/gssapi_server.cpp +++ b/src/gssapi_server.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/gssapi_server.hpp b/src/gssapi_server.hpp index 55c706f2..34fe72ac 100644 --- a/src/gssapi_server.hpp +++ b/src/gssapi_server.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_decoder.hpp b/src/i_decoder.hpp index 1879c66e..37233692 100644 --- a/src/i_decoder.hpp +++ b/src/i_decoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_encoder.hpp b/src/i_encoder.hpp index a22017eb..31e60173 100644 --- a/src/i_encoder.hpp +++ b/src/i_encoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_engine.hpp b/src/i_engine.hpp index 49896c21..13ddfa03 100644 --- a/src/i_engine.hpp +++ b/src/i_engine.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_poll_events.hpp b/src/i_poll_events.hpp index 1e033906..ec84f568 100644 --- a/src/i_poll_events.hpp +++ b/src/i_poll_events.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_object.cpp b/src/io_object.cpp index 03192a75..d15e774e 100644 --- a/src/io_object.cpp +++ b/src/io_object.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_object.hpp b/src/io_object.hpp index af033691..0d13b3bd 100644 --- a/src/io_object.hpp +++ b/src/io_object.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_thread.cpp b/src/io_thread.cpp index e7fb1417..29c1aea6 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_thread.hpp b/src/io_thread.hpp index 49a2e80d..0b1ac742 100644 --- a/src/io_thread.hpp +++ b/src/io_thread.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ip.cpp b/src/ip.cpp index 6d4c47a8..15ef176c 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ip.hpp b/src/ip.hpp index 82ebf0b6..ec95621c 100644 --- a/src/ip.hpp +++ b/src/ip.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_address.cpp b/src/ipc_address.cpp index e45fb53b..b9664e40 100644 --- a/src/ipc_address.cpp +++ b/src/ipc_address.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_address.hpp b/src/ipc_address.hpp index e5f674b5..2e27293e 100644 --- a/src/ipc_address.hpp +++ b/src/ipc_address.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index 330dbffd..2028f584 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_connecter.hpp b/src/ipc_connecter.hpp index cb119c23..491bf08d 100644 --- a/src/ipc_connecter.hpp +++ b/src/ipc_connecter.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp index eef54359..744adf96 100644 --- a/src/ipc_listener.cpp +++ b/src/ipc_listener.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_listener.hpp b/src/ipc_listener.hpp index 2a63a722..b5714f73 100644 --- a/src/ipc_listener.hpp +++ b/src/ipc_listener.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/kqueue.cpp b/src/kqueue.cpp index e77cf722..5057b85f 100644 --- a/src/kqueue.cpp +++ b/src/kqueue.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/kqueue.hpp b/src/kqueue.hpp index b3e68d6c..43da1ba3 100644 --- a/src/kqueue.hpp +++ b/src/kqueue.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/lb.cpp b/src/lb.cpp index 7fdd765b..df19a987 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/lb.hpp b/src/lb.hpp index 6a64e1d8..0f9922c1 100644 --- a/src/lb.hpp +++ b/src/lb.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/likely.hpp b/src/likely.hpp index b7f50c16..64975188 100644 --- a/src/likely.hpp +++ b/src/likely.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mailbox.cpp b/src/mailbox.cpp index bd140a4c..c4b98307 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mailbox.hpp b/src/mailbox.hpp index abb28777..45c261fd 100644 --- a/src/mailbox.hpp +++ b/src/mailbox.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mechanism.cpp b/src/mechanism.cpp index dc1ab829..b9422585 100644 --- a/src/mechanism.cpp +++ b/src/mechanism.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mechanism.hpp b/src/mechanism.hpp index a3b43d4a..d39f5824 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/metadata.cpp b/src/metadata.cpp index db8f0940..1e2e192c 100644 --- a/src/metadata.cpp +++ b/src/metadata.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -25,10 +25,6 @@ zmq::metadata_t::metadata_t (const dict_t &dict) : { } -zmq::metadata_t::~metadata_t () -{ -} - const char *zmq::metadata_t::get (const std::string &property) const { dict_t::const_iterator it = dict.find (property); diff --git a/src/metadata.hpp b/src/metadata.hpp index bb16d14b..c4d1e024 100644 --- a/src/metadata.hpp +++ b/src/metadata.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -30,29 +30,29 @@ namespace zmq class metadata_t { public: - - typedef std::map dict_t; + typedef std::map dict_t; metadata_t (const dict_t &dict); - virtual ~metadata_t (); // Returns pointer to property value or NULL if // property is not found. - virtual const char *get (const std::string &property) const; + const char *get (const std::string &property) const; - virtual void add_ref (); + void add_ref (); // Drop reference. Returns true iff the reference // counter drops to zero. - virtual bool drop_ref (); + bool drop_ref (); private: + metadata_t(const metadata_t&); + metadata_t & operator=(const metadata_t&); // Reference counter. atomic_counter_t ref_cnt; // Dictionary holding metadata. - const dict_t dict; + dict_t dict; }; } diff --git a/src/msg.cpp b/src/msg.cpp index 72e45580..df185d9e 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/msg.hpp b/src/msg.hpp index 04eb8f63..2fd1ef40 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mtrie.cpp b/src/mtrie.cpp index a5b54a72..fa8f9c58 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mtrie.hpp b/src/mtrie.hpp index 6b89aebb..7159967d 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mutex.hpp b/src/mutex.hpp index 26c30d37..2368d518 100644 --- a/src/mutex.hpp +++ b/src/mutex.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/null_mechanism.cpp b/src/null_mechanism.cpp index cb4b2644..b13dbeaf 100644 --- a/src/null_mechanism.cpp +++ b/src/null_mechanism.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/null_mechanism.hpp b/src/null_mechanism.hpp index 8802df3f..17b952f3 100644 --- a/src/null_mechanism.hpp +++ b/src/null_mechanism.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/object.cpp b/src/object.cpp index cdd991a3..565585f2 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/object.hpp b/src/object.hpp index ed9f45b5..9b7ad831 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/options.cpp b/src/options.cpp index 5450dbf2..f08c595d 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -45,8 +45,10 @@ zmq::options_t::options_t () : ipv6 (0), immediate (0), filter (false), + invert_matching(false), recv_identity (false), - raw_sock (false), + raw_socket (false), + raw_notify (false), tcp_keepalive (-1), tcp_keepalive_cnt (-1), tcp_keepalive_idle (-1), @@ -499,6 +501,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, } break; + case ZMQ_INVERT_MATCHING: + if (is_int) { + invert_matching = (value != 0); + return 0; + } + break; + default: #if defined (ZMQ_ACT_MILITANT) // There are valid scenarios for probing with unknown socket option @@ -845,6 +854,13 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) } break; + case ZMQ_INVERT_MATCHING: + if (is_int) { + *value = invert_matching; + return 0; + } + break; + default: #if defined (ZMQ_ACT_MILITANT) malformed = false; diff --git a/src/options.hpp b/src/options.hpp index 3bacec0e..eae018ce 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -108,11 +108,17 @@ namespace zmq // If 1, (X)SUB socket should filter the messages. If 0, it should not. bool filter; + // If true, the subscription matching on (X)PUB and (X)SUB sockets + // is reversed. Messages are sent to and received by non-matching + // sockets. + bool invert_matching; + // If true, the identity message is forwarded to the socket. bool recv_identity; // if true, router socket accepts non-zmq tcp connections - bool raw_sock; + bool raw_socket; + bool raw_notify; // Provide connect notifications // Addres of SOCKS proxy std::string socks_proxy_address; diff --git a/src/own.cpp b/src/own.cpp index e3247aff..4377ec4d 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/own.hpp b/src/own.hpp index 13f32a62..e64596e8 100644 --- a/src/own.hpp +++ b/src/own.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pair.cpp b/src/pair.cpp index 1ec431b9..13210842 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pair.hpp b/src/pair.hpp index 18d1bc67..53f6e263 100644 --- a/src/pair.hpp +++ b/src/pair.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index c556368b..cbc6495c 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index 89daf033..e2604a5b 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 448442c8..b03e0046 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp index e58e4789..147cbc6e 100644 --- a/src/pgm_sender.hpp +++ b/src/pgm_sender.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 186e09ae..7e94d592 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp index 788cc3ff..71085715 100644 --- a/src/pgm_socket.hpp +++ b/src/pgm_socket.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pipe.cpp b/src/pipe.cpp index fcb14a10..19902b24 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pipe.hpp b/src/pipe.hpp index ef17a406..0be2c500 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -86,12 +86,14 @@ namespace zmq // Reads a message to the underlying pipe. bool read (msg_t *msg_); - // Checks whether messages can be written to the pipe. If writing - // the message would cause high watermark the function returns false. + // Checks whether messages can be written to the pipe. If the pipe is + // closed or if writing the message would cause high watermark the + // function returns false. bool check_write (); // Writes a message to the underlying pipe. Returns false if the - // message cannot be written because high watermark was reached. + // message does not pass check_write. If false, the message object + // retains ownership of its message buffer. bool write (msg_t *msg_); // Remove unfinished parts of the outbound message from the pipe. diff --git a/src/plain_client.cpp b/src/plain_client.cpp index 4bf41bfa..22f4b48c 100644 --- a/src/plain_client.cpp +++ b/src/plain_client.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/plain_client.hpp b/src/plain_client.hpp index c76bd05d..95cf8ccf 100644 --- a/src/plain_client.hpp +++ b/src/plain_client.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/plain_server.cpp b/src/plain_server.cpp index 211e9fa4..f591f4e3 100644 --- a/src/plain_server.cpp +++ b/src/plain_server.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/plain_server.hpp b/src/plain_server.hpp index a66445c0..0c472624 100644 --- a/src/plain_server.hpp +++ b/src/plain_server.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poll.cpp b/src/poll.cpp index 18778500..98cbfd44 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poll.hpp b/src/poll.hpp index c2d6c6eb..acad27fe 100644 --- a/src/poll.hpp +++ b/src/poll.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller.hpp b/src/poller.hpp index 0c04a194..2cdff160 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller_base.cpp b/src/poller_base.cpp index a6d2f585..3ed36460 100644 --- a/src/poller_base.cpp +++ b/src/poller_base.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller_base.hpp b/src/poller_base.hpp index cd666d4b..e3aee9fa 100644 --- a/src/poller_base.hpp +++ b/src/poller_base.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/precompiled.cpp b/src/precompiled.cpp index 37b9014a..87fa08ce 100644 --- a/src/precompiled.cpp +++ b/src/precompiled.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/precompiled.hpp b/src/precompiled.hpp index 27187324..bcdcac05 100644 --- a/src/precompiled.hpp +++ b/src/precompiled.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/proxy.cpp b/src/proxy.cpp index 625b0dd8..81d98838 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/proxy.hpp b/src/proxy.hpp index c055290b..c65738c3 100644 --- a/src/proxy.hpp +++ b/src/proxy.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pub.cpp b/src/pub.cpp index d64bacba..fd671882 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pub.hpp b/src/pub.hpp index 4646c7bc..21f1e304 100644 --- a/src/pub.hpp +++ b/src/pub.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pull.cpp b/src/pull.cpp index 85854539..5e911ef7 100644 --- a/src/pull.cpp +++ b/src/pull.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pull.hpp b/src/pull.hpp index f1580b4b..d8282705 100644 --- a/src/pull.hpp +++ b/src/pull.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/push.cpp b/src/push.cpp index 92c57e99..4da95821 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/push.hpp b/src/push.hpp index f6a96a7b..fba577a7 100644 --- a/src/push.hpp +++ b/src/push.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/random.cpp b/src/random.cpp index ab1e251d..1a603b30 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/random.hpp b/src/random.hpp index b4ea8434..332f988d 100644 --- a/src/random.hpp +++ b/src/random.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/raw_decoder.cpp b/src/raw_decoder.cpp index 72011888..2340bec6 100644 --- a/src/raw_decoder.cpp +++ b/src/raw_decoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/raw_decoder.hpp b/src/raw_decoder.hpp index 000397c8..65779acc 100644 --- a/src/raw_decoder.hpp +++ b/src/raw_decoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/raw_encoder.cpp b/src/raw_encoder.cpp index a7a0f043..9c9b5b1b 100644 --- a/src/raw_encoder.cpp +++ b/src/raw_encoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/raw_encoder.hpp b/src/raw_encoder.hpp index f568724b..67d9c4e3 100644 --- a/src/raw_encoder.hpp +++ b/src/raw_encoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/reaper.cpp b/src/reaper.cpp index 015ae983..16916afd 100644 --- a/src/reaper.cpp +++ b/src/reaper.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/reaper.hpp b/src/reaper.hpp index b5b67cf8..8f9d243b 100644 --- a/src/reaper.hpp +++ b/src/reaper.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/rep.cpp b/src/rep.cpp index 58d49031..8482adbb 100644 --- a/src/rep.cpp +++ b/src/rep.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/rep.hpp b/src/rep.hpp index 0dcf927e..08b09a8a 100644 --- a/src/rep.hpp +++ b/src/rep.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/req.cpp b/src/req.cpp index f47f2621..09e16385 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/req.hpp b/src/req.hpp index 13816f68..92b98ed7 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/router.cpp b/src/router.cpp index fc1035e8..ac8e124d 100644 --- a/src/router.cpp +++ b/src/router.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -33,14 +33,14 @@ zmq::router_t::router_t (class ctx_t *parent_, uint32_t tid_, int sid_) : more_out (false), next_rid (generate_random ()), mandatory (false), - // raw_sock functionality in ROUTER is deprecated - raw_sock (false), + // raw_socket functionality in ROUTER is deprecated + raw_socket (false), probe_router (false), handover (false) { options.type = ZMQ_ROUTER; options.recv_identity = true; - options.raw_sock = false; + options.raw_socket = false; prefetched_id.init (); prefetched_msg.init (); @@ -96,10 +96,10 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_, break; case ZMQ_ROUTER_RAW: if (is_int && value >= 0) { - raw_sock = (value != 0); - if (raw_sock) { + raw_socket = (value != 0); + if (raw_socket) { options.recv_identity = false; - options.raw_sock = true; + options.raw_socket = true; } return 0; } @@ -223,7 +223,7 @@ int zmq::router_t::xsend (msg_t *msg_) } // Ignore the MORE flag for raw-sock or assert? - if (options.raw_sock) + if (options.raw_socket) msg_->reset_flags (msg_t::more); // Check whether this is the last part of the message. @@ -235,7 +235,7 @@ int zmq::router_t::xsend (msg_t *msg_) // Close the remote connection if user has asked to do so // by sending zero length message. // Pending messages in the pipe will be dropped (on receiving term- ack) - if (raw_sock && msg_->size() == 0) { + if (raw_socket && msg_->size() == 0) { current_out->terminate (false); int rc = msg_->close (); errno_assert (rc == 0); @@ -246,12 +246,16 @@ int zmq::router_t::xsend (msg_t *msg_) } bool ok = current_out->write (msg_); - if (unlikely (!ok)) - current_out = NULL; - else - if (!more_out) { - current_out->flush (); + if (unlikely (!ok)) { + // Message failed to send - we must close it ourselves. + int rc = msg_->close (); + errno_assert (rc == 0); current_out = NULL; + } else { + if (!more_out) { + current_out->flush (); + current_out = NULL; + } } } else { @@ -397,14 +401,14 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_) zmq_assert(false); // Not allowed to duplicate an existing rid } else - if (options.raw_sock) { // Always assign identity for raw-socket + if (options.raw_socket) { // Always assign identity for raw-socket unsigned char buf [5]; buf [0] = 0; put_uint32 (buf + 1, next_rid++); identity = blob_t (buf, sizeof buf); } else - if (!options.raw_sock) { + if (!options.raw_socket) { // Pick up handshake cases and also case where next identity is set msg.init (); ok = pipe_->read (&msg); diff --git a/src/router.hpp b/src/router.hpp index f5b1ff6c..30c95fe8 100644 --- a/src/router.hpp +++ b/src/router.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -111,7 +111,7 @@ namespace zmq // If true, report EAGAIN to the caller instead of silently dropping // the message targeting an unknown peer. bool mandatory; - bool raw_sock; + bool raw_socket; // if true, send an empty message to every connected router peer bool probe_router; diff --git a/src/select.cpp b/src/select.cpp index cb73bb78..1b54243d 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/select.hpp b/src/select.hpp index a35448b4..61ce07d6 100644 --- a/src/select.hpp +++ b/src/select.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/session_base.cpp b/src/session_base.cpp index 548675df..5ddc0b83 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -213,14 +213,15 @@ void zmq::session_base_t::pipe_terminated (pipe_t *pipe_) cancel_timer (linger_timer_id); has_linger_timer = false; } - } else + } + else if (pipe_ == zap_pipe) zap_pipe = NULL; else // Remove the pipe from the detached pipes set terminating_pipes.erase (pipe_); - if (!is_terminating () && options.raw_sock) { + if (!is_terminating () && options.raw_socket) { if (engine) { engine->terminate (); engine = NULL; diff --git a/src/session_base.hpp b/src/session_base.hpp index 74858f3b..ba209f8a 100644 --- a/src/session_base.hpp +++ b/src/session_base.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/signaler.cpp b/src/signaler.cpp index 25667bf5..a1fd72f0 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/signaler.hpp b/src/signaler.hpp index b66f0ae4..1fb02712 100644 --- a/src/signaler.hpp +++ b/src/signaler.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 0c12e37d..2085448b 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socket_base.hpp b/src/socket_base.hpp index afbb36f4..2742d223 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socks.cpp b/src/socks.cpp index 4ec8d738..f38d24a5 100644 --- a/src/socks.cpp +++ b/src/socks.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socks.hpp b/src/socks.hpp index 8fe4594b..f0cf78e1 100644 --- a/src/socks.hpp +++ b/src/socks.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index 91e11c54..7a2856e3 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socks_connecter.hpp b/src/socks_connecter.hpp index 0443ff83..263a0bd9 100644 --- a/src/socks_connecter.hpp +++ b/src/socks_connecter.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/stdint.hpp b/src/stdint.hpp index 2d8fb238..70063a00 100644 --- a/src/stdint.hpp +++ b/src/stdint.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/stream.cpp b/src/stream.cpp index 8a00c963..11180b5c 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -33,7 +33,7 @@ zmq::stream_t::stream_t (class ctx_t *parent_, uint32_t tid_, int sid_) : next_rid (generate_random ()) { options.type = ZMQ_STREAM; - options.raw_sock = true; + options.raw_socket = true; prefetched_id.init (); prefetched_msg.init (); @@ -167,6 +167,8 @@ int zmq::stream_t::xsend (msg_t *msg_) int zmq::stream_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { + bool is_int = (optvallen_ == sizeof (int)); + int value = is_int? *((int *) optval_): 0; switch (option_) { case ZMQ_CONNECT_RID: if (optval_ && optvallen_) { @@ -174,6 +176,14 @@ int zmq::stream_t::xsetsockopt (int option_, const void *optval_, return 0; } break; + + case ZMQ_STREAM_NOTIFY: + if (is_int && (value == 0 || value == 1)) { + options.raw_notify = value; + return 0; + } + break; + default: break; } diff --git a/src/stream.hpp b/src/stream.hpp index 5ea23754..99b612f6 100644 --- a/src/stream.hpp +++ b/src/stream.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 030ddecb..82f5ad0a 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -180,7 +180,7 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_, handle = add_fd (s); io_error = false; - if (options.raw_sock) { + if (options.raw_socket) { // no handshaking for raw sock, instantiate raw encoder and decoders encoder = new (std::nothrow) raw_encoder_t (out_batch_size); alloc_assert (encoder); @@ -194,13 +194,15 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_, next_msg = &stream_engine_t::pull_msg_from_session; process_msg = &stream_engine_t::push_msg_to_session; - // For raw sockets, send an initial 0-length message to the - // application so that it knows a peer has connected. - msg_t connector; - connector.init(); - push_msg_to_session (&connector); - connector.close(); - session->flush (); + if (options.raw_notify) { + // For raw sockets, send an initial 0-length message to the + // application so that it knows a peer has connected. + msg_t connector; + connector.init(); + push_msg_to_session (&connector); + connector.close(); + session->flush (); + } } else { // start optional timer, to prevent handshake hanging on no input @@ -804,7 +806,6 @@ void zmq::stream_engine_t::mechanism_ready () // Compile metadata. typedef metadata_t::dict_t properties_t; properties_t properties; - properties_t::const_iterator it; // If we have a peer_address, add it to metadata if (!peer_address.empty()) { @@ -911,7 +912,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_sock) { + if (options.raw_socket) { // For raw sockets, send a final 0-length message to the application // so that it knows the peer has been disconnected. msg_t terminator; @@ -931,7 +932,7 @@ void zmq::stream_engine_t::set_handshake_timer () { zmq_assert (!has_handshake_timer); - if (!options.raw_sock && options.handshake_ivl > 0) { + if (!options.raw_socket && options.handshake_ivl > 0) { add_timer (options.handshake_ivl, handshake_timer_id); has_handshake_timer = true; } diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index a538943e..140f13a6 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/sub.cpp b/src/sub.cpp index 3330b708..1105e894 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/sub.hpp b/src/sub.hpp index 6360b479..aa9a3f0a 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp.cpp b/src/tcp.cpp old mode 100755 new mode 100644 index 3d646e42..5d7ef7d5 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp.hpp b/src/tcp.hpp index d2856ecf..c4e8a113 100644 --- a/src/tcp.hpp +++ b/src/tcp.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index 53fbe0d9..70391da1 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_address.hpp b/src/tcp_address.hpp index 6d24a58b..55eac63a 100644 --- a/src/tcp_address.hpp +++ b/src/tcp_address.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index b714ecd1..435a9045 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_connecter.hpp b/src/tcp_connecter.hpp index 4ff0088e..f1e61a8c 100644 --- a/src/tcp_connecter.hpp +++ b/src/tcp_connecter.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index f67f5006..c1b4ebf0 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp index 22cdc364..430cb22a 100644 --- a/src/tcp_listener.hpp +++ b/src/tcp_listener.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/thread.cpp b/src/thread.cpp index dcf18b1d..03758d27 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/thread.hpp b/src/thread.hpp index 6c40e23b..d4c7f772 100644 --- a/src/thread.hpp +++ b/src/thread.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_address.cpp b/src/tipc_address.cpp index 5e1e2cda..a8568dbb 100644 --- a/src/tipc_address.cpp +++ b/src/tipc_address.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_address.hpp b/src/tipc_address.hpp index 1d92481d..22f1f09a 100644 --- a/src/tipc_address.hpp +++ b/src/tipc_address.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_connecter.cpp b/src/tipc_connecter.cpp index 66707baa..62b063cb 100644 --- a/src/tipc_connecter.cpp +++ b/src/tipc_connecter.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_connecter.hpp b/src/tipc_connecter.hpp index 50843f6a..4c3d8785 100644 --- a/src/tipc_connecter.hpp +++ b/src/tipc_connecter.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_listener.cpp b/src/tipc_listener.cpp index 821cfa99..b52dd760 100644 --- a/src/tipc_listener.cpp +++ b/src/tipc_listener.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tipc_listener.hpp b/src/tipc_listener.hpp index 1d86db19..928a24bb 100644 --- a/src/tipc_listener.hpp +++ b/src/tipc_listener.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/trie.cpp b/src/trie.cpp index e516c351..5c531fc1 100644 --- a/src/trie.cpp +++ b/src/trie.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/trie.hpp b/src/trie.hpp index 0bfd602c..be595a6b 100644 --- a/src/trie.hpp +++ b/src/trie.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v1_decoder.cpp b/src/v1_decoder.cpp index 388fe074..5a7f8c18 100644 --- a/src/v1_decoder.cpp +++ b/src/v1_decoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v1_decoder.hpp b/src/v1_decoder.hpp index 3540e5e8..b7356967 100644 --- a/src/v1_decoder.hpp +++ b/src/v1_decoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v1_encoder.cpp b/src/v1_encoder.cpp index bbae005f..eb9b09b7 100644 --- a/src/v1_encoder.cpp +++ b/src/v1_encoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v1_encoder.hpp b/src/v1_encoder.hpp index 00a63ded..559229f7 100644 --- a/src/v1_encoder.hpp +++ b/src/v1_encoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v2_decoder.cpp b/src/v2_decoder.cpp index e2d716b4..5079f512 100644 --- a/src/v2_decoder.cpp +++ b/src/v2_decoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v2_decoder.hpp b/src/v2_decoder.hpp index 30bf1afc..dbca2bc4 100644 --- a/src/v2_decoder.hpp +++ b/src/v2_decoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v2_encoder.cpp b/src/v2_encoder.cpp index ff30119a..41d0e0c9 100644 --- a/src/v2_encoder.cpp +++ b/src/v2_encoder.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v2_encoder.hpp b/src/v2_encoder.hpp index bc70d06a..57298d52 100644 --- a/src/v2_encoder.hpp +++ b/src/v2_encoder.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/v2_protocol.hpp b/src/v2_protocol.hpp index 365e6879..79b5670e 100644 --- a/src/v2_protocol.hpp +++ b/src/v2_protocol.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/windows.hpp b/src/windows.hpp old mode 100755 new mode 100644 index 5e98ffb8..eeb05fd1 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/wire.hpp b/src/wire.hpp index 3bc8ee4d..667494a8 100644 --- a/src/wire.hpp +++ b/src/wire.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xpub.cpp b/src/xpub.cpp index 93b44347..a1f36ab9 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -179,9 +179,14 @@ int zmq::xpub_t::xsend (msg_t *msg_) bool msg_more = msg_->flags () & msg_t::more ? true : false; // For the first part of multi-part message, find the matching pipes. - if (!more) + if (!more) { subscriptions.match ((unsigned char*) msg_->data (), msg_->size (), mark_as_matching, this); + // If inverted matching is used, reverse the selection now + if (options.invert_matching) { + dist.reverse_match(); + } + } int rc = -1; // Assume we fail if (lossy || dist.check_hwm ()) { diff --git a/src/xpub.hpp b/src/xpub.hpp index 8544c729..4c6f60f1 100644 --- a/src/xpub.hpp +++ b/src/xpub.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xsub.cpp b/src/xsub.cpp index aaf51310..ddbc8f9f 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -206,7 +206,9 @@ zmq::blob_t zmq::xsub_t::get_credential () const bool zmq::xsub_t::match (msg_t *msg_) { - return subscriptions.check ((unsigned char*) msg_->data (), msg_->size ()); + bool matching = subscriptions.check ((unsigned char*) msg_->data (), msg_->size ()); + + return matching ^ options.invert_matching; } void zmq::xsub_t::send_subscription (unsigned char *data_, size_t size_, diff --git a/src/xsub.hpp b/src/xsub.hpp index 7b3a3884..a38b4830 100644 --- a/src/xsub.hpp +++ b/src/xsub.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ypipe.hpp b/src/ypipe.hpp index 8a6b0544..565ac043 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ypipe_base.hpp b/src/ypipe_base.hpp index a3d67656..3c7dda7c 100644 --- a/src/ypipe_base.hpp +++ b/src/ypipe_base.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ypipe_conflate.hpp b/src/ypipe_conflate.hpp index 94698acf..53d81c8f 100644 --- a/src/ypipe_conflate.hpp +++ b/src/ypipe_conflate.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/yqueue.hpp b/src/yqueue.hpp index fd987bbf..114a868f 100644 --- a/src/yqueue.hpp +++ b/src/yqueue.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/zmq.cpp b/src/zmq.cpp index cffcc2a5..57830796 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/zmq_utils.cpp b/src/zmq_utils.cpp index 852d4ede..3b79deab 100644 --- a/src/zmq_utils.cpp +++ b/src/zmq_utils.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 54b50da9..27ac4653 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -44,6 +44,7 @@ set(tests test_diffserv test_connect_rid test_xpub_nodrop + test_pub_invert_matching ) if(NOT WIN32) list(APPEND tests diff --git a/tests/test_abstract_ipc.cpp b/tests/test_abstract_ipc.cpp index c6d87652..584fbe0d 100644 --- a/tests/test_abstract_ipc.cpp +++ b/tests/test_abstract_ipc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_atomics.cpp b/tests/test_atomics.cpp index c9abaa9c..65cffef2 100644 --- a/tests/test_atomics.cpp +++ b/tests/test_atomics.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_bind_src_address.cpp b/tests/test_bind_src_address.cpp index ac08e806..59387ba8 100644 --- a/tests/test_bind_src_address.cpp +++ b/tests/test_bind_src_address.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_capabilities.cpp b/tests/test_capabilities.cpp index eaa8699f..fa6e13fe 100644 --- a/tests/test_capabilities.cpp +++ b/tests/test_capabilities.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_conflate.cpp b/tests/test_conflate.cpp index 63480e3d..8a84ec9c 100644 --- a/tests/test_conflate.cpp +++ b/tests/test_conflate.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_connect_delay_tipc.cpp b/tests/test_connect_delay_tipc.cpp index 1fd4e306..e7c1c352 100644 --- a/tests/test_connect_delay_tipc.cpp +++ b/tests/test_connect_delay_tipc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_connect_resolve.cpp b/tests/test_connect_resolve.cpp index 6189500a..0e655d92 100644 --- a/tests/test_connect_resolve.cpp +++ b/tests/test_connect_resolve.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_connect_rid.cpp b/tests/test_connect_rid.cpp index 23e493b9..a83ed1e4 100644 --- a/tests/test_connect_rid.cpp +++ b/tests/test_connect_rid.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -63,19 +63,13 @@ void test_stream_2_stream(){ // Accept data on the bound stream. ret = zmq_recv (rbind, buff, 256, 0); - assert (ret && 0 == buff[0]); - assert (0 == buff[0]); - ret = zmq_recv (rbind, buff, 256, 0); - assert (0 == ret); - - // Handle close of the socket. - ret = zmq_recv (rbind, buff, 256, 0); assert (ret); assert (0 == buff[0]); ret = zmq_recv (rbind, buff+128, 128, 0); - assert (5 == ret); + assert (5 == ret); assert ('h' == buff[128]); + // Handle close of the socket. ret = zmq_unbind (rbind, bindip); assert(0 == ret); ret = zmq_close (rbind); diff --git a/tests/test_ctx_destroy.cpp b/tests/test_ctx_destroy.cpp index d8ce961d..bbad5f61 100644 --- a/tests/test_ctx_destroy.cpp +++ b/tests/test_ctx_destroy.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_ctx_options.cpp b/tests/test_ctx_options.cpp index 914dae3e..09a166d5 100644 --- a/tests/test_ctx_options.cpp +++ b/tests/test_ctx_options.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_diffserv.cpp b/tests/test_diffserv.cpp index 518a5f7c..241f83af 100644 --- a/tests/test_diffserv.cpp +++ b/tests/test_diffserv.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_disconnect_inproc.cpp b/tests/test_disconnect_inproc.cpp index dd484fcd..25461a71 100644 --- a/tests/test_disconnect_inproc.cpp +++ b/tests/test_disconnect_inproc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_filter_ipc.cpp b/tests/test_filter_ipc.cpp index 83035949..8512f375 100644 --- a/tests/test_filter_ipc.cpp +++ b/tests/test_filter_ipc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_fork.cpp b/tests/test_fork.cpp index 59fab3e7..0fc32d43 100644 --- a/tests/test_fork.cpp +++ b/tests/test_fork.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index 4903248c..3e9f135f 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_hwm_pubsub.cpp b/tests/test_hwm_pubsub.cpp index 8f6ba41d..83d55f42 100644 --- a/tests/test_hwm_pubsub.cpp +++ b/tests/test_hwm_pubsub.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_immediate.cpp b/tests/test_immediate.cpp index 863b7463..4f98c2f3 100644 --- a/tests/test_immediate.cpp +++ b/tests/test_immediate.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_inproc_connect.cpp b/tests/test_inproc_connect.cpp index 4938baa4..2f815be3 100644 --- a/tests/test_inproc_connect.cpp +++ b/tests/test_inproc_connect.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index 810eb7ad..988de4fe 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_iov.cpp b/tests/test_iov.cpp index 5dd4f74c..8153738d 100644 --- a/tests/test_iov.cpp +++ b/tests/test_iov.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_ipc_wildcard.cpp b/tests/test_ipc_wildcard.cpp index 73b8bb87..89b1012f 100644 --- a/tests/test_ipc_wildcard.cpp +++ b/tests/test_ipc_wildcard.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_issue_566.cpp b/tests/test_issue_566.cpp index 8500a867..d8ff5d52 100644 --- a/tests/test_issue_566.cpp +++ b/tests/test_issue_566.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_last_endpoint.cpp b/tests/test_last_endpoint.cpp index 6722951b..7775704c 100644 --- a/tests/test_last_endpoint.cpp +++ b/tests/test_last_endpoint.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_many_sockets.cpp b/tests/test_many_sockets.cpp index 5d3cf1b8..19a5de64 100644 --- a/tests/test_many_sockets.cpp +++ b/tests/test_many_sockets.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_metadata.cpp b/tests/test_metadata.cpp index 09f9dbfc..6aff95ff 100644 --- a/tests/test_metadata.cpp +++ b/tests/test_metadata.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_monitor.cpp b/tests/test_monitor.cpp index 90b314b5..e63686b1 100644 --- a/tests/test_monitor.cpp +++ b/tests/test_monitor.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_msg_flags.cpp b/tests/test_msg_flags.cpp index 4fdd7a1e..1df8edb5 100644 --- a/tests/test_msg_flags.cpp +++ b/tests/test_msg_flags.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp index d6637c0f..f191073c 100644 --- a/tests/test_pair_inproc.cpp +++ b/tests/test_pair_inproc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp index 819a7b3d..76fb0988 100644 --- a/tests/test_pair_ipc.cpp +++ b/tests/test_pair_ipc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index a007c397..d7084d8b 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_probe_router.cpp b/tests/test_probe_router.cpp index 093f41a8..ff6938b7 100644 --- a/tests/test_probe_router.cpp +++ b/tests/test_probe_router.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_proxy.cpp b/tests/test_proxy.cpp index 381a90ce..e4aac782 100644 --- a/tests/test_proxy.cpp +++ b/tests/test_proxy.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pub_invert_matching.cpp b/tests/test_pub_invert_matching.cpp new file mode 100644 index 00000000..a42efdf5 --- /dev/null +++ b/tests/test_pub_invert_matching.cpp @@ -0,0 +1,126 @@ +/* + Copyright (c) 2007-2014 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); + + // Create a publisher + void *pub = zmq_socket (ctx, ZMQ_PUB); + assert (pub); + int rc = zmq_bind (pub, "inproc://soname"); + assert (rc == 0); + + // Create two subscribers + void *sub1 = zmq_socket (ctx, ZMQ_SUB); + assert (sub1); + rc = zmq_connect (sub1, "inproc://soname"); + assert (rc == 0); + + void *sub2 = zmq_socket (ctx, ZMQ_SUB); + assert (sub2); + rc = zmq_connect (sub2, "inproc://soname"); + assert (rc == 0); + + // Subscribe pub1 to one prefix + // and pub2 to another prefix. + const char PREFIX1[] = "prefix1"; + const char PREFIX2[] = "p2"; + + rc = zmq_setsockopt (sub1, ZMQ_SUBSCRIBE, PREFIX1, sizeof(PREFIX1)); + assert (rc == 0); + + rc = zmq_setsockopt (sub2, ZMQ_SUBSCRIBE, PREFIX2, sizeof(PREFIX2)); + assert (rc == 0); + + // Send a message with the first prefix + rc = zmq_send_const(pub, PREFIX1, sizeof(PREFIX1), 0); + assert (rc == sizeof(PREFIX1)); + + // sub1 should receive it, but not sub2 + rc = zmq_recv (sub1, NULL, 0, ZMQ_DONTWAIT); + assert (rc == sizeof(PREFIX1)); + + rc = zmq_recv (sub2, NULL, 0, ZMQ_DONTWAIT); + assert (rc == -1); + assert (errno == EAGAIN); + + // Send a message with the second prefix + rc = zmq_send_const(pub, PREFIX2, sizeof(PREFIX2), 0); + assert (rc == sizeof(PREFIX2)); + + // sub2 should receive it, but not sub1 + rc = zmq_recv (sub2, NULL, 0, ZMQ_DONTWAIT); + assert (rc == sizeof(PREFIX2)); + + rc = zmq_recv (sub1, NULL, 0, ZMQ_DONTWAIT); + assert (rc == -1); + assert (errno == EAGAIN); + + // Now invert the matching + int invert = 1; + rc = zmq_setsockopt (pub, ZMQ_INVERT_MATCHING, &invert, sizeof(invert)); + assert (rc == 0); + + // ... on both sides, otherwise the SUB socket will filter the messages out + rc = zmq_setsockopt (sub1, ZMQ_INVERT_MATCHING, &invert, sizeof(invert)); + rc = zmq_setsockopt (sub2, ZMQ_INVERT_MATCHING, &invert, sizeof(invert)); + assert (rc == 0); + + // Send a message with the first prefix + rc = zmq_send_const(pub, PREFIX1, sizeof(PREFIX1), 0); + assert (rc == sizeof(PREFIX1)); + + // sub2 should receive it, but not sub1 + rc = zmq_recv (sub2, NULL, 0, ZMQ_DONTWAIT); + assert (rc == sizeof(PREFIX1)); + + rc = zmq_recv (sub1, NULL, 0, ZMQ_DONTWAIT); + assert (rc == -1); + assert (errno == EAGAIN); + + // Send a message with the second prefix + rc = zmq_send_const(pub, PREFIX2, sizeof(PREFIX2), 0); + assert (rc == sizeof(PREFIX2)); + + // sub1 should receive it, but not sub2 + rc = zmq_recv (sub1, NULL, 0, ZMQ_DONTWAIT); + assert (rc == sizeof(PREFIX2)); + + rc = zmq_recv (sub2, NULL, 0, ZMQ_DONTWAIT); + assert (rc == -1); + assert (errno == EAGAIN); + + + // Clean up. + rc = zmq_close (pub); + assert (rc == 0); + rc = zmq_close (sub1); + assert (rc == 0); + rc = zmq_close (sub2); + assert (rc == 0); + rc = zmq_ctx_term (ctx); + assert (rc == 0); + + return 0 ; +} diff --git a/tests/test_req_correlate.cpp b/tests/test_req_correlate.cpp index af5a583b..298248fe 100644 --- a/tests/test_req_correlate.cpp +++ b/tests/test_req_correlate.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_req_relaxed.cpp b/tests/test_req_relaxed.cpp index 03915d0d..b2c25acb 100644 --- a/tests/test_req_relaxed.cpp +++ b/tests/test_req_relaxed.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index 4ea8d0c6..340116b8 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp index acecafce..65424ae1 100644 --- a/tests/test_reqrep_inproc.cpp +++ b/tests/test_reqrep_inproc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index 8c0837ee..56c88bba 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index f6f180e5..e16f32fc 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_router_handover.cpp b/tests/test_router_handover.cpp index bed2d636..2ae13b4b 100644 --- a/tests/test_router_handover.cpp +++ b/tests/test_router_handover.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_router_mandatory.cpp b/tests/test_router_mandatory.cpp index ca8fb24e..de493476 100644 --- a/tests/test_router_mandatory.cpp +++ b/tests/test_router_mandatory.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_router_mandatory_hwm.cpp b/tests/test_router_mandatory_hwm.cpp index 78066f5d..bdc3e551 100644 --- a/tests/test_router_mandatory_hwm.cpp +++ b/tests/test_router_mandatory_hwm.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index fd8cdd3b..69aa2785 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index 6b74e8ce..e3c7b518 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index c257840c..affce3ff 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index 27dd605a..44d8bbb5 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_spec_dealer.cpp b/tests/test_spec_dealer.cpp index e9294889..855ec15f 100644 --- a/tests/test_spec_dealer.cpp +++ b/tests/test_spec_dealer.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_spec_pushpull.cpp b/tests/test_spec_pushpull.cpp index 35b694c3..4d6e651d 100644 --- a/tests/test_spec_pushpull.cpp +++ b/tests/test_spec_pushpull.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_spec_rep.cpp b/tests/test_spec_rep.cpp index 9bdb8aab..160199df 100644 --- a/tests/test_spec_rep.cpp +++ b/tests/test_spec_rep.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_spec_req.cpp b/tests/test_spec_req.cpp index d8a9a3a1..8892a5f4 100644 --- a/tests/test_spec_req.cpp +++ b/tests/test_spec_req.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_spec_router.cpp b/tests/test_spec_router.cpp index 39984ffc..5c57d347 100644 --- a/tests/test_spec_router.cpp +++ b/tests/test_spec_router.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_srcfd.cpp b/tests/test_srcfd.cpp index 062a85ea..f5c6b5ea 100644 --- a/tests/test_srcfd.cpp +++ b/tests/test_srcfd.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_stream.cpp b/tests/test_stream.cpp index 3841087d..20a03ca5 100644 --- a/tests/test_stream.cpp +++ b/tests/test_stream.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -54,6 +54,9 @@ test_stream_to_dealer (void) int zero = 0; rc = zmq_setsockopt (stream, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); + int enabled = 1; + rc = zmq_setsockopt (stream, ZMQ_STREAM_NOTIFY, &enabled, sizeof (enabled)); + assert (rc == 0); rc = zmq_bind (stream, "tcp://127.0.0.1:5556"); assert (rc == 0); @@ -182,11 +185,16 @@ test_stream_to_stream (void) void *server = zmq_socket (ctx, ZMQ_STREAM); assert (server); + int enabled = 1; + rc = zmq_setsockopt (server, ZMQ_STREAM_NOTIFY, &enabled, sizeof (enabled)); + assert (rc == 0); rc = zmq_bind (server, "tcp://127.0.0.1:9070"); assert (rc == 0); void *client = zmq_socket (ctx, ZMQ_STREAM); assert (client); + rc = zmq_setsockopt (client, ZMQ_STREAM_NOTIFY, &enabled, sizeof (enabled)); + assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9070"); assert (rc == 0); uint8_t id [256]; diff --git a/tests/test_stream_disconnect.cpp b/tests/test_stream_disconnect.cpp index 1233c859..7c221c46 100644 --- a/tests/test_stream_disconnect.cpp +++ b/tests/test_stream_disconnect.cpp @@ -55,15 +55,20 @@ int main(int, char**) { setup_test_environment(); - void* context = zmq_ctx_new (); - void* sockets [2]; + void *context = zmq_ctx_new (); + void *sockets [2]; int rc = 0; sockets [SERVER] = zmq_socket (context, ZMQ_STREAM); + int enabled = 1; + rc = zmq_setsockopt (sockets [SERVER], ZMQ_STREAM_NOTIFY, &enabled, sizeof (enabled)); + assert (rc == 0); rc = zmq_bind (sockets [SERVER], "tcp://0.0.0.0:6666"); assert (rc == 0); sockets [CLIENT] = zmq_socket (context, ZMQ_STREAM); + rc = zmq_setsockopt (sockets [CLIENT], ZMQ_STREAM_NOTIFY, &enabled, sizeof (enabled)); + assert (rc == 0); rc = zmq_connect (sockets [CLIENT], "tcp://localhost:6666"); assert (rc == 0); diff --git a/tests/test_stream_empty.cpp b/tests/test_stream_empty.cpp index a8f88ee6..5d2041ec 100644 --- a/tests/test_stream_empty.cpp +++ b/tests/test_stream_empty.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_stream_timeout.cpp b/tests/test_stream_timeout.cpp index dce88ea7..25757ff3 100644 --- a/tests/test_stream_timeout.cpp +++ b/tests/test_stream_timeout.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_sub_forward.cpp b/tests/test_sub_forward.cpp index f480ba2f..aa0f856c 100644 --- a/tests/test_sub_forward.cpp +++ b/tests/test_sub_forward.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_system.cpp b/tests/test_system.cpp index c758d8d0..c55de0ad 100644 --- a/tests/test_system.cpp +++ b/tests/test_system.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_term_endpoint.cpp b/tests/test_term_endpoint.cpp index 00812d42..3153bc14 100644 --- a/tests/test_term_endpoint.cpp +++ b/tests/test_term_endpoint.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index 1ddaec38..95d36bdf 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_xpub_manual.cpp b/tests/test_xpub_manual.cpp index d8f10349..2c6484c3 100644 --- a/tests/test_xpub_manual.cpp +++ b/tests/test_xpub_manual.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_xpub_nodrop.cpp b/tests/test_xpub_nodrop.cpp index cc15e934..c3450114 100644 --- a/tests/test_xpub_nodrop.cpp +++ b/tests/test_xpub_nodrop.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_xpub_welcome_msg.cpp b/tests/test_xpub_welcome_msg.cpp index 7cc7de97..b0ed19e0 100644 --- a/tests/test_xpub_welcome_msg.cpp +++ b/tests/test_xpub_welcome_msg.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 98e447aa..1b7a7728 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file + Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of 0MQ.