diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sub.cpp | 15 | ||||
-rw-r--r-- | src/sub.hpp | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/sub.cpp b/src/sub.cpp index d2b4f96..cde8fa6 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -51,7 +51,7 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_, // Pass it further on in the stack. int err = 0; - int rc = xsend (&msg, 0); + int rc = xsub_t::xsend (&msg, 0); if (rc != 0) err = errno; zmq_msg_close (&msg); @@ -59,3 +59,16 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_, errno = err; return rc; } + +int zmq::sub_t::xsend (zmq_msg_t *msg_, int options_) +{ + // Overload the XSUB's send. + errno = ENOTSUP; + return -1; +} + +bool zmq::sub_t::xhas_out () +{ + // Overload the XSUB's send. + return false; +} diff --git a/src/sub.hpp b/src/sub.hpp index 44fbc9c..6ed2c12 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -35,6 +35,8 @@ namespace zmq protected: int xsetsockopt (int option_, const void *optval_, size_t optvallen_); + int xsend (zmq_msg_t *msg_, int options_); + bool xhas_out (); private: |