zeromq / zmqpp

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

receiving can only be done to empty messages? #28

Closed LindleyF closed 10 years ago

LindleyF commented 10 years ago

In zmqpp, the socket_t::receive() method throws an exception if you pass it a non-empty message_t. This seems to be contradictory to the philosophy of zmq_recv(), which states that the message passed to it will be deallocated cleanly if necessary.

Now, I know zmqpp defines a "message" as all parts of a multipart message, while libzmq defines it as just one part. So this isn't a direct contradiction of the API semantics. But it seems like this could be fixed without much effort.