// 2) timeouts and locking
// io think this function should now "work" more or less as is
- function sendReceiveTcp($message_type, $message) {
+ function sendReceive($message_type, $message) {
// yeah... this is totally gunna work
global $TCP_PORT_NUMBER;
$datacomp = base64_encode(serialize($msg));
$tosend = "AC:$datacomp:EOD";
- socket_send($socket, $tosend, strlen($tosend));
+ socket_send($socket, $tosend, strlen($tosend), 0);
// get up to one meg of data - this is bad... i can feel this function
// hurting alot
while($continue) {
$size = socket_recv($socket, $recvd_a, 1024, 0);
$recvd .= $recvd_a;
- if(preg_match("/.*\:EOD$/", $recvd) {
+ if(preg_match("/.*\:EOD$/", $recvd)) {
// we have a full string... break out
$continue = false;
break;
return $component["data"];
}
- function sendReceive($message_type, $message) {
+ function sendReceiveIPC($message_type, $message) {
global $MSG_QUEUE_KEY_ID_SERVER, $MSG_QUEUE_KEY_ID_CLIENT;