intercomm's work - or not work as the case may be
[pengine.git] / unittests / commrecv.php
index 2061063..000ecef 100644 (file)
@@ -1,13 +1,16 @@
 <?php 
 require_once("../lib/lib.php");
 
-$mn = new netCom(true);
-
-$mn->go();
-while(true) {
-       $mn->waitForSecureConnection();
-       while(($msg = $mn->receiveMessage()) !== false) {
-               print_r($msg);
-       }
+function myfunction($msg)
+{
+       echo "got a msg\n";
+       print_r($msg);
+       echo "end message\n";
+       $returnmsg["0"] = "asdf";
+       
+       return $returnmsg; 
 }
+$mn = new netCom(true, "127.0.0.1", false);
+
+$pid = $mn->go("myfunction");
 ?>
\ No newline at end of file