- int const r = nn_send (_socket, s.c_str(), s.length(), 0);
- if (r < 0) {
- throw runtime_error(String::compose("Could not send to nanomsg socket (%1)", errno));
- } else if (r != int(s.length())) {
- throw runtime_error("Could not send to nanomsg socket (message too big)");
- }