Open adityabharadwaj14 opened 4 years ago
No. You should use the new send and recv functions if you can, or suppress the warnings locally.
No. You should use the new send and recv functions if you can, or suppress the warnings locally.
Can you please elaborate on this, as in what are the new functions?
The functions take messages or buffers by reference and also take zmq::recv_flags or send_flags. They also have different return types which are more consistent. There are some examples in the Readme.
The thing is i installed zmq fro c++ based on the procedure mentioned here https://github.com/zeromq/cppzmq . I would like to know if there's an installation procedure that can avoid these warnings.
warning: ‘bool zmq::detail::socket_base::recv(zmq::message_t, int)’ is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations] socket.recv(&request); ^ In file included from /mnt/hgfs/home/Zeromq/ServerProgram/main.cpp:1:0: /usr/local/include/zmq.hpp:1874:10: note: declared here bool recv(message_t msg, int flags = 0) ^~~~ /mnt/hgfs/home/Zeromq/ServerProgram/main.cpp:29:26: warning: ‘bool zmq::detail::socket_base::send(zmq::message_t&, int)’ is deprecated: from 4.3.1, use send taking message_t and send_flags [-Wdeprecated-declarations] socket.send(reply); ^ In file included from /mnt/hgfs/home/Zeromq/ServerProgram/main.cpp:1:0: /usr/local/include/zmq.hpp:1793:10: note: declared here bool send(messaget &msg, ^~~~