Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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