summaryrefslogtreecommitdiff
path: root/src/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.cpp')
-rw-r--r--src/options.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/options.cpp b/src/options.cpp
index 120ae7c..3f903cb 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -30,6 +30,8 @@ zmq::options_t::options_t () :
rate (100),
recovery_ivl (10),
use_multicast_loop (true),
+ sndbuf (0),
+ rcvbuf (0),
requires_in (false),
requires_out (false)
{
@@ -106,6 +108,22 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
return -1;
}
return 0;
+
+ case ZMQ_SNDBUF:
+ if (optvallen_ != sizeof (uint64_t)) {
+ errno = EINVAL;
+ return -1;
+ }
+ sndbuf = *((uint64_t*) optval_);
+ return 0;
+
+ case ZMQ_RCVBUF:
+ if (optvallen_ != sizeof (uint64_t)) {
+ errno = EINVAL;
+ return -1;
+ }
+ rcvbuf = *((uint64_t*) optval_);
+ return 0;
}
errno = EINVAL;