Skip to content

Commit

Permalink
[Dev] Switched to newer ZeroMQ C++ API
Browse files Browse the repository at this point in the history
  • Loading branch information
da115115 committed Jun 26, 2022
1 parent e128a12 commit fd9d909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tvlsim/server/TvlSimServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,19 +511,19 @@ int readConfiguration (int argc, char* argv[], std::string& ioServerProtocol,
*/
static std::string s_recv (zmq::socket_t& socket) {
zmq::message_t message;
socket.recv (&message);
socket.recv (message);

return std::string (static_cast<char*> (message.data()), message.size());
}

/**
* Convert string to 0MQ string and send to socket.
*/
static bool s_send (zmq::socket_t& socket, const std::string& string) {
static zmq::send_result_t s_send (zmq::socket_t& socket, const std::string& string) {
zmq::message_t message (string.size());
memcpy (message.data(), string.data(), string.size());

bool rc = socket.send (message);
zmq::send_result_t rc = socket.send (message, zmq::send_flags::dontwait);
return rc;
}

Expand Down

0 comments on commit fd9d909

Please sign in to comment.