Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #230 #259

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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