From a47ad701b5adc48193ebf177ae6978aed8c92650 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Fri, 27 Jul 2012 09:52:07 +0200 Subject: [PATCH] index_wr.php management sanitized --- web/spush/brisk-spush.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index 2e2f812..28088f3 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -226,18 +226,17 @@ function main() break; case SITE_PREFIX."index_wr.php": $header_out = array(); - $addr = ""; - // $ret = socket_getpeername($new_socket, $addr); - printf("RET: %s\n", $addr); - // exit(123); ob_start(); index_wr_main($room, $addr, $get, $post, $cookie); $content = ob_get_contents(); ob_end_clean(); - - // printf("OUT: [%s]\n", $G_content); - fwrite($new_socket, headers_render($header_out).$content); - fclose($new_socket); + + $pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content); + + if ($pgflush->try_flush($curtime) == FALSE) { + // Add $pgflush to the pgflush array + array_push($pages_flush, $pgflush); + } break; case SITE_PREFIX."index_rd_ifra.php": do { -- 2.17.1