Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
williamleong committed Jan 23, 2025
1 parent ba4230d commit de7947b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/zmqpp/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,21 @@ void socket::close()

bool socket::send(std::string const& str, bool dont_block/* = false */)
{
return send(str, (dont_block) ? socket::dont_wait : socket::normal);
message_t msg(str);
return send(msg, (dont_block) ? socket::dont_wait : socket::normal);
}

bool socket::receive(std::string &str, bool dont_block /* = false */)
{
// Unable to use message wrapper as this could be multipart legacy fallback
return receive(str, (dont_block) ? socket::dont_wait : socket::normal);
message msg;

bool ret = receive(msg, (dont_block) ? socket::dont_wait : socket::normal);
if (ret)
{
msg.get(str, 0);
}

return ret;
}

bool socket::send(zmqpp::signal sig, bool dont_block/* = false */)
Expand Down

0 comments on commit de7947b

Please sign in to comment.