public function sendMulti($socket, $message, $timeout = -1)
{
// what are we doing?
if ($timeout == -1) {
$log = usingLog()->startAction("sendmulti() to ZMQ socket; no timeout");
$socket->setSockOpt(ZMQ::SOCKOPT_SNDTIMEO, -1);
} else {
$log = usingLog()->startAction("sendmulti() to ZMQ socket; timeout is {$timeout} seconds");
$socket->setSockOpt(ZMQ::SOCKOPT_SNDTIMEO, $timeout * 1000);
}
// do it
$socket->sendmulti($message);
// all done
$log->endAction();
}