i dont believe, i switched to tcp and it seems to WORK
[ga4php.git] / authserver / lib / authClient.php
index e43d2cc..4f398ac 100644 (file)
@@ -12,7 +12,7 @@ class GAAuthClient {
        // 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;
                
@@ -29,7 +29,7 @@ class GAAuthClient {
                $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
@@ -41,7 +41,7 @@ class GAAuthClient {
                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;
@@ -71,7 +71,7 @@ class GAAuthClient {
                return $component["data"];
        }
        
-       function sendReceive($message_type, $message) {
+       function sendReceiveIPC($message_type, $message) {
                global $MSG_QUEUE_KEY_ID_SERVER, $MSG_QUEUE_KEY_ID_CLIENT;