zeromq / zmqpp

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

Fix #210 + Test cases : Get socket_option::identity returns wrong value #211

Closed johanLsp closed 6 years ago

johanLsp commented 6 years ago

Linked to issue #210 The identity socket option is not a null-terminated string, as opposed to other string typed options. Its final character was removed when retrieving its value. This pull request fixes it by handling socket_option::identity vs other socket options differently. An additional test case is added to complement the current set & get test cases : set a value, retrieve it and compare. This is distinct from current set & get test cases, which are mainly aimed at checking value types and exceptions.

I added another test to cover my initial use case : stream socket, to enable communication to a non-zmq socket