Add new option ZMQ_MULTICAST_MAXTPDU to set PGM_MTU.

Fixes #1646
This commit is contained in:
Jim Hague
2015-11-23 19:35:02 +00:00
parent 5d04dc354e
commit e71471b2e8
7 changed files with 53 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ zmq::options_t::options_t () :
rate (100),
recovery_ivl (10000),
multicast_hops (1),
multicast_maxtpdu (1500),
sndbuf (-1),
rcvbuf (-1),
tos (0),
@@ -211,6 +212,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
}
break;
case ZMQ_MULTICAST_MAXTPDU:
if (is_int && value > 0) {
multicast_maxtpdu = value;
return 0;
}
break;
case ZMQ_RCVTIMEO:
if (is_int && value >= -1) {
rcvtimeo = value;
@@ -735,6 +743,13 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
}
break;
case ZMQ_MULTICAST_MAXTPDU:
if (is_int) {
*value = multicast_maxtpdu;
return 0;
}
break;
case ZMQ_RCVTIMEO:
if (is_int) {
*value = rcvtimeo;