diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-07-11 09:57:59 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-07-11 09:57:59 +0200 |
commit | d7adc3f19a4c941e854552d6d7881950a69b0d23 (patch) | |
tree | efddd559463040a438a71d30a6c098b98c61d972 /src/options.cpp | |
parent | a154ef69da4e41d3a8ce5a3141fe8f052c7ea853 (diff) |
ZMQ_FILTER option removed
The filtering is now done depending on the socket type. SUB socket
filters the messages (end-to-end filtering) while XSUB relies
on upstream nodes to do (imprefect) filtering.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/options.cpp')
-rw-r--r-- | src/options.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/options.cpp b/src/options.cpp index aa92f93..be7c4b5 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -38,12 +38,12 @@ zmq::options_t::options_t () : reconnect_ivl_max (0), backlog (100), maxmsgsize (-1), - filter (1), rcvtimeo (-1), sndtimeo (-1), immediate_connect (true), delay_on_close (true), - delay_on_disconnect (true) + delay_on_disconnect (true), + filter (false) { } @@ -177,15 +177,6 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, multicast_hops = *((int*) optval_); return 0; - case ZMQ_FILTER: - if (optvallen_ != sizeof (int) || (*((int*) optval_) != 0 && - *((int*) optval_) != 1)) { - errno = EINVAL; - return -1; - } - filter = *((int*) optval_); - return 0; - case ZMQ_RCVTIMEO: if (optvallen_ != sizeof (int)) { errno = EINVAL; @@ -347,15 +338,6 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) *optvallen_ = sizeof (int); return 0; - case ZMQ_FILTER: - if (*optvallen_ < sizeof (int)) { - errno = EINVAL; - return -1; - } - *((int*) optval_) = filter; - *optvallen_ = sizeof (int); - return 0; - case ZMQ_RCVTIMEO: if (*optvallen_ < sizeof (int)) { errno = EINVAL; |