server-side ping management fixed
[brisk.git] / web / Obj / user.phh
index 9240474..a6f1b90 100644 (file)
@@ -637,7 +637,7 @@ class User {
 
   /* INDEX_RD_IFRA PORT */
 
-  static function blocking_error($is_unrecoverable)
+  protected function blocking_error($is_unrecoverable)
   {
       GLOBAL $is_page_streaming;
       
@@ -822,7 +822,7 @@ class User {
       return ($ret);
   }  //   function maincheck (...
 
-static function stream_fini($is_unrecoverable)
+public static function stream_fini($is_unrecoverable)
 {
     GLOBAL $G_four_rnd_string;
 
@@ -944,31 +944,23 @@ push(\"%s\");
     return TRUE;
 }
 
-function stream_keepalive()
+function stream_keepalive($with_ping)
 {
-    return (sprintf("<script id='hs%d' type='text/javascript'><!--
-push(null);
+    $ret =  (sprintf("<script id='hs%d' type='text/javascript'><!--
+push(%s);
 // -->
-</script>", $this->rd_scristp++));
-    
+</script>", $this->rd_scristp++, ($with_ping ? "\"act_ping();\"" : "null")));
+
+    return ($ret);
 }
 
-function stream_ping()
+static function base_get()
 {
-    return (sprintf("<script id='hs%d' type='text/javascript'><!--
-push(\"act_ping();\");
-// -->
-</script>", $this->rd_scristp++));
-    
+    $c = get_called_class();
+    printf("CALLED_CLASS: [%s]\n", $c);
+    return $c::BASE;
 }
 
-    static function base_get()
-    {
-        $c = get_called_class();
-        printf("CALLED_CLASS: [%s]\n", $c);
-        return $c::BASE;
-    }
-
 } // end class User