X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.php;h=411339461981e47ca835b3628e54794699adb083;hb=cb2f40283ece5cd3c855e74281773e5722996f23;hp=a6c3a086c776a66b390e5ffb0227b3f01d68ea17;hpb=3a6ca985ae8091796e82193cd446384c6dd00068;p=brisk.git diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index a6c3a08..4113394 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -56,6 +56,7 @@ $G_base = "../"; require_once("./sac-a-push.phh"); require_once("./brisk-spush.phh"); +require_once($G_base."Obj/user.phh"); require_once($G_base."Obj/brisk.phh"); require_once($G_base."Obj/auth.phh"); // require_once("../Obj/proxyscan.phh"); @@ -294,7 +295,7 @@ class Sac_a_push { do { if (!isset($cookie['sess']) || (($user = $this->room->get_user($cookie['sess'], $idx)) == FALSE)) { - $content = index_rd_ifra_fini(TRUE); + $content = User::stream_fini(TRUE); $pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content); @@ -314,7 +315,7 @@ class Sac_a_push { } $content = ""; - index_rd_ifra_init($this->room, $user, $header_out, $content, $get, $post, $cookie); + $user->stream_init($header_out, $content, $get, $post, $cookie); $response = headers_render($header_out, -1).chunked_content($content); $response_l = mb_strlen($response, "ASCII"); @@ -392,23 +393,25 @@ class Sac_a_push { } } - + + /* manage unfinished pages */ foreach ($this->pages_flush as $k => $pgflush) { if ($pgflush->try_flush($curtime) == TRUE) { unset($this->pages_flush[$k]); } } + /* manage open streaming */ foreach ($this->socks as $k => $sock) { if (isset($this->s2u[intval($sock)])) { $user = $this->s2u[intval($sock)]; $response = $user->rd_cache_get(); if ($response == "") { $content = ""; - index_rd_ifra_main($this->room, $user, $content, $get, $post, $cookie); + $user->stream_main($content, $get, $post, $cookie); if ($content == "" && $user->rd_kalive_is_expired($curtime)) { - $content = index_rd_ifra_keepalive($user); + $content = $user->stream_keepalive(); } if ($content != "") { $response = chunked_content($content);