move restart of iframe/htmlfile based stream from iframe onload callback to postproc...
[brisk.git] / web / Obj / sac-a-push.phh
index c140192..c6858b8 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  *  brisk - spush/sac-a-push.phh
  *
@@ -311,7 +310,6 @@ class Sac_a_push {
     var $blocking_mode;
 
     var $app;
-    var $bin5;
 
     var $curtime;
 
@@ -341,7 +339,7 @@ class Sac_a_push {
         $thiz->rndstr = "";
         for ($i = 0 ; $i < 4096 ; $i++) {
             if (($i % 128) == 0)
-                $thiz->rndstr .= "\n";
+                $thiz->rndstr .= " ";
             else
                 $thiz->rndstr .= chr(mt_rand(65, 90));
         }
@@ -547,6 +545,14 @@ class Sac_a_push {
                                 if ($line == "reload") {
                                     require("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
                                 }
+                                else if ($line == "shutdown") {
+                                    if ($this->app->dump_data()) {
+                                        exit(0);
+                                    }
+                                    else {
+                                        exit(1);
+                                    }
+                                }
                             }
                             else {
                                 $key = array_search("$sock", $this->socks);