zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
439 stars 195 forks source link

Added socket option for router_handover #126

Closed djelenc closed 9 years ago

djelenc commented 9 years ago

I tried setting socket.set(zmqpp::socket_option::router_handover, true); but was getting a runtime exception that it could not be done.

terminate called after throwing an instance of 'zmqpp::exception'
  what():  attempting to set a non boolean option with a boolean value
Aborted (core dumped)

I added the above snippet so that now zmqpp correctly handles this call.

I tested the solution manually and it works as intended. Also, I tried to write a unit test, but I could not get my hand around all those macros -- I am rather new to C++.

I also considered writing a corresponding fix for the get option, but according to the docs, this should be a set only option.

xaqq commented 9 years ago

Thanks. The patch is small enough that we can live without unit test for it :)