added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests

This commit is contained in:
malosek
2009-09-16 12:22:36 +02:00
parent 9c522dccaf
commit 7a5db6041f
16 changed files with 144 additions and 66 deletions

View File

@@ -158,11 +158,18 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_,
return 0;
case ZMQ_MCAST_LOOP:
if (optvallen_ != sizeof (bool)) {
if (optvallen_ != sizeof (int64_t)) {
errno = EINVAL;
return -1;
}
if ((int64_t) *((int64_t*) optval_) == 0 ||
(int64_t) *((int64_t*) optval_) == 1) {
options.use_multicast_loop = (bool) *((int64_t*) optval_);
} else {
errno = EINVAL;
return -1;
}
options.use_multicast_loop = optval_;
return 0;
default: