This commit is contained in:
Telford Berkey 2015-01-28 12:49:38 -05:00
commit be8cdc2bf6
249 changed files with 563 additions and 306 deletions

View File

@ -495,9 +495,6 @@ tests_test_bind_src_address_LDADD = src/libzmq.la
tests_test_metadata_SOURCES = tests/test_metadata.cpp tests_test_metadata_SOURCES = tests/test_metadata.cpp
tests_test_metadata_LDADD = src/libzmq.la 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_SOURCES = tests/test_capabilities.cpp
tests_test_capabilities_LDADD = src/libzmq.la tests_test_capabilities_LDADD = src/libzmq.la

View File

@ -266,6 +266,29 @@ Default value:: 0 (false)
Applicable socket types:: all, primarily when using TCP/IPC transports. 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 ZMQ_IPV4ONLY: Retrieve IPv4-only socket override status
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the IPv4-only option for the socket. This option is deprecated. Retrieve the IPv4-only option for the socket. This option is deprecated.

View File

@ -670,6 +670,19 @@ Default value:: -1 (infinite)
Applicable socket types:: all 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 ZMQ_SUBSCRIBE: Establish message filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' 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) Default value:: 1 (true)
Applicable socket types:: all, when using TCP transports. 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 RETURN VALUE
------------ ------------
The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it

View File

@ -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. This file is part of 0MQ.
@ -195,7 +195,10 @@ ZMQ_EXPORT int zmq_ctx_destroy (void *context);
/* 0MQ message definition. */ /* 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); 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_ZAP_DOMAIN 55
#define ZMQ_ROUTER_HANDOVER 56 #define ZMQ_ROUTER_HANDOVER 56
#define ZMQ_TOS 57 #define ZMQ_TOS 57
#define ZMQ_CONNECT_RID 61 #define ZMQ_CONNECT_RID 61
#define ZMQ_GSSAPI_SERVER 62 #define ZMQ_GSSAPI_SERVER 62
#define ZMQ_GSSAPI_PRINCIPAL 63 #define ZMQ_GSSAPI_PRINCIPAL 63
#define ZMQ_GSSAPI_SERVICE_PRINCIPAL 64 #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_BLOCKY 70
#define ZMQ_XPUB_MANUAL 71 #define ZMQ_XPUB_MANUAL 71
#define ZMQ_XPUB_WELCOME_MSG 72 #define ZMQ_XPUB_WELCOME_MSG 72
#define ZMQ_STREAM_NOTIFY 73
#define ZMQ_INVERT_MATCHING 74
/* Message options */ /* Message options */
#define ZMQ_MORE 1 #define ZMQ_MORE 1

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

18
src/dist.cpp Executable file → Normal file
View File

@ -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. This file is part of 0MQ.
@ -69,6 +69,22 @@ void zmq::dist_t::match (pipe_t *pipe_)
matching++; 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 () void zmq::dist_t::unmatch ()
{ {
matching = 0; matching = 0;

View File

@ -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. This file is part of 0MQ.
@ -50,6 +50,9 @@ namespace zmq
// will send message also to this pipe. // will send message also to this pipe.
void match (zmq::pipe_t *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. // Mark all pipes as non-matching.
void unmatch (); void unmatch ();

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. 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 const char *zmq::metadata_t::get (const std::string &property) const
{ {
dict_t::const_iterator it = dict.find (property); dict_t::const_iterator it = dict.find (property);

View File

@ -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. This file is part of 0MQ.
@ -30,29 +30,29 @@ namespace zmq
class metadata_t class metadata_t
{ {
public: public:
typedef std::map <std::string, std::string> dict_t;
typedef std::map <std::string, const std::string> dict_t;
metadata_t (const dict_t &dict); metadata_t (const dict_t &dict);
virtual ~metadata_t ();
// Returns pointer to property value or NULL if // Returns pointer to property value or NULL if
// property is not found. // 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 // Drop reference. Returns true iff the reference
// counter drops to zero. // counter drops to zero.
virtual bool drop_ref (); bool drop_ref ();
private: private:
metadata_t(const metadata_t&);
metadata_t & operator=(const metadata_t&);
// Reference counter. // Reference counter.
atomic_counter_t ref_cnt; atomic_counter_t ref_cnt;
// Dictionary holding metadata. // Dictionary holding metadata.
const dict_t dict; dict_t dict;
}; };
} }

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.
@ -45,8 +45,10 @@ zmq::options_t::options_t () :
ipv6 (0), ipv6 (0),
immediate (0), immediate (0),
filter (false), filter (false),
invert_matching(false),
recv_identity (false), recv_identity (false),
raw_sock (false), raw_socket (false),
raw_notify (false),
tcp_keepalive (-1), tcp_keepalive (-1),
tcp_keepalive_cnt (-1), tcp_keepalive_cnt (-1),
tcp_keepalive_idle (-1), tcp_keepalive_idle (-1),
@ -499,6 +501,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
} }
break; break;
case ZMQ_INVERT_MATCHING:
if (is_int) {
invert_matching = (value != 0);
return 0;
}
break;
default: default:
#if defined (ZMQ_ACT_MILITANT) #if defined (ZMQ_ACT_MILITANT)
// There are valid scenarios for probing with unknown socket option // 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; break;
case ZMQ_INVERT_MATCHING:
if (is_int) {
*value = invert_matching;
return 0;
}
break;
default: default:
#if defined (ZMQ_ACT_MILITANT) #if defined (ZMQ_ACT_MILITANT)
malformed = false; malformed = false;

View File

@ -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. 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. // If 1, (X)SUB socket should filter the messages. If 0, it should not.
bool filter; 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. // If true, the identity message is forwarded to the socket.
bool recv_identity; bool recv_identity;
// if true, router socket accepts non-zmq tcp connections // 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 // Addres of SOCKS proxy
std::string socks_proxy_address; std::string socks_proxy_address;

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.
@ -86,12 +86,14 @@ namespace zmq
// Reads a message to the underlying pipe. // Reads a message to the underlying pipe.
bool read (msg_t *msg_); bool read (msg_t *msg_);
// Checks whether messages can be written to the pipe. If writing // Checks whether messages can be written to the pipe. If the pipe is
// the message would cause high watermark the function returns false. // closed or if writing the message would cause high watermark the
// function returns false.
bool check_write (); bool check_write ();
// Writes a message to the underlying pipe. Returns false if the // 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_); bool write (msg_t *msg_);
// Remove unfinished parts of the outbound message from the pipe. // Remove unfinished parts of the outbound message from the pipe.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

View File

@ -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. This file is part of 0MQ.

Some files were not shown because too many files have changed in this diff Show More