gst status object and sess-ion value passed to http_streaming as params
[xynt.git] / web / test-hs-rd.php
index bd4667e..78baf48 100644 (file)
@@ -19,7 +19,12 @@ function mop_flush()
 
 function main()
 {
-    $st = 0;
+    GLOBAL $st;
+
+    if (!isset($st)) {
+        $st = 0;
+    }
+
     $fp = fopen("/tmp/test-hs-rd.log", "a");
     fwrite($fp, "START\n");
     fclose($fp);
@@ -38,9 +43,10 @@ function main()
             // exit();
             sleep(30);
         }
-        printf("<script id='hs%d' type='text/javascript'>
-push(\"$('cont').innerHTML += '%s %d';\");
-</script>", $i, ($first ? "<br/>" : ""), $i);
+
+printf("<script id='hs%d' type='text/javascript'>
+push(\"$('cont').innerHTML += '%s %d'; gst.st = %d;\");
+</script>", $i, ($first ? "<br/>" : ""), $i, $i);
 
         if ($first)
             printf("<!-- %s -->", $s);