$comms->putConfig($config->getConfig());
+ $msg = $comms->waitForMessage();
+
+ //echo "Got message: $msg\n";
+
$cont = false;
}
?>
\ No newline at end of file
function waitForMessage()
{
+ global $MESSAGE_KEY, $LOCKING_KEY, $STORE_KEY;
+ $queue = msg_get_queue($MESSAGE_KEY);
+ msg_receive($queue, 0, $msgtype, 1024, $msg);
+ return $msg;
}
- function sendMessage()
+ function sendMessage($msg)
{
+ global $MESSAGE_KEY, $LOCKING_KEY, $STORE_KEY;
+ $queue = msg_get_queue($MESSAGE_KEY);
+ msg_send($queue, 1, $msg);
}