summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-03-23 17:01:39 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-03-23 17:01:39 +0100
commitb45b68ae4ab90af1ce35deec52b0c0492a1f49d4 (patch)
treeb5ad48702e03088b957fab8ea31e90029270ec41 /src
parentf5e6d67948b8c71c2444046f6246aebab16546dc (diff)
ZMQ_MCAST_LOOP removed
Multicast loopback is not a real multicast, rather a kernel-space simulation. Moreover, it tends to be rather unreliable and lossy. Removing the option will force users to use transports better suited for the job, such as inproc or ipc. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/options.cpp25
-rw-r--r--src/options.hpp3
-rw-r--r--src/pgm_socket.cpp2
3 files changed, 1 insertions, 29 deletions
diff --git a/src/options.cpp b/src/options.cpp
index b5696fb..79e4029 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -32,7 +32,6 @@ zmq::options_t::options_t () :
rate (100),
recovery_ivl (10),
recovery_ivl_msec (-1),
- use_multicast_loop (true),
sndbuf (0),
rcvbuf (0),
type (-1),
@@ -113,21 +112,6 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
recovery_ivl_msec = (int32_t) *((int64_t*) optval_);
return 0;
- case ZMQ_MCAST_LOOP:
- if (optvallen_ != sizeof (int64_t)) {
- errno = EINVAL;
- return -1;
- }
- if ((int64_t) *((int64_t*) optval_) == 0)
- use_multicast_loop = false;
- else if ((int64_t) *((int64_t*) optval_) == 1)
- use_multicast_loop = true;
- else {
- errno = EINVAL;
- return -1;
- }
- return 0;
-
case ZMQ_SNDBUF:
if (optvallen_ != sizeof (uint64_t)) {
errno = EINVAL;
@@ -266,15 +250,6 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
*optvallen_ = sizeof (int64_t);
return 0;
- case ZMQ_MCAST_LOOP:
- if (*optvallen_ < sizeof (int64_t)) {
- errno = EINVAL;
- return -1;
- }
- *((int64_t*) optval_) = use_multicast_loop ? 1 : 0;
- *optvallen_ = sizeof (int64_t);
- return 0;
-
case ZMQ_SNDBUF:
if (*optvallen_ < sizeof (uint64_t)) {
errno = EINVAL;
diff --git a/src/options.hpp b/src/options.hpp
index d05019b..62ecadf 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -48,9 +48,6 @@ namespace zmq
// Reliability time interval [ms]. Default -1 = not used.
int32_t recovery_ivl_msec;
- // Enable multicast loopback. Default disabled (false).
- bool use_multicast_loop;
-
uint64_t sndbuf;
uint64_t rcvbuf;
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index f253c76..89cdcea 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -322,7 +322,7 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
// Set IP level parameters.
{
const int nonblocking = 1,
- multicast_loop = options.use_multicast_loop ? 1 : 0,
+ multicast_loop = 0,
multicast_hops = 16,
// Expedited Forwarding PHB for network elements, no ECN.