summaryrefslogtreecommitdiff
path: root/src/options.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-15 11:24:33 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-15 11:24:33 +0200
commitc8e8f2a24cd339c548e06f75a3cef96454671a85 (patch)
treeb8ea021d0755acedca74563cfc74921634071f83 /src/options.cpp
parentba67eff167e94105b0975166a2192060ab125e58 (diff)
ZMQ_IDENTITY socket option removed
This patch simplifies the whole codebase significantly, including dropping depedency on libuuid. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/options.cpp')
-rw-r--r--src/options.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/options.cpp b/src/options.cpp
index 63a1d91..45eb4aa 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -75,19 +75,6 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
affinity = *((uint64_t*) optval_);
return 0;
- case ZMQ_IDENTITY:
-
- // Empty identity is invalid as well as identity longer than
- // 255 bytes. Identity starting with binary zero is invalid
- // as these are used for auto-generated identities.
- if (optvallen_ < 1 || optvallen_ > 255 ||
- *((const unsigned char*) optval_) == 0) {
- errno = EINVAL;
- return -1;
- }
- identity.assign ((const unsigned char*) optval_, optvallen_);
- return 0;
-
case ZMQ_RATE:
if (optvallen_ != sizeof (int) || *((int*) optval_) <= 0) {
errno = EINVAL;
@@ -229,15 +216,6 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
*optvallen_ = sizeof (uint64_t);
return 0;
- case ZMQ_IDENTITY:
- if (*optvallen_ < identity.size ()) {
- errno = EINVAL;
- return -1;
- }
- memcpy (optval_, identity.data (), identity.size ());
- *optvallen_ = identity.size ();
- return 0;
-
case ZMQ_RATE:
if (*optvallen_ < sizeof (int)) {
errno = EINVAL;