Merge pull request #889 from olafmandel/MAX_SOCKETS_MAX

Add ZMQ_MAX_SOCKETS_MAX to zmq_ctx_get()
This commit is contained in:
Pieter Hintjens
2014-02-13 19:15:01 +01:00
5 changed files with 20 additions and 1 deletions

View File

@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <limits>
#include "testutil.hpp"
int main (void)
@@ -29,6 +30,13 @@ int main (void)
assert (ctx);
assert (zmq_ctx_get (ctx, ZMQ_MAX_SOCKETS) == ZMQ_MAX_SOCKETS_DFLT);
#if defined(ZMQ_USE_SELECT)
assert (zmq_ctx_get (ctx, ZMQ_MAX_SOCKETS_MAX) == ZMQ_MAX_SOCKETS_DFLT);
#elif defined(ZMQ_USE_POLL) || defined(ZMQ_USE_EPOLL) \
|| defined(ZMQ_USE_DEVPOLL) || defined(ZMQ_USE_KQUEUE)
assert (zmq_ctx_get (ctx, ZMQ_MAX_SOCKETS_MAX)
== std::numeric_limits<int>::max());
#endif
assert (zmq_ctx_get (ctx, ZMQ_IO_THREADS) == ZMQ_IO_THREADS_DFLT);
assert (zmq_ctx_get (ctx, ZMQ_IPV6) == 0);