X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.phh;h=11e5497c36030305f1a4f23b1fc2f4840a0dce80;hp=0f22baaa1d6c63c5b93eb9e5aac5c330740040d0;hb=db5d6355c39327ba7f8052f360f1e846ba4ad01c;hpb=5470910335a6a3e37b30783bfa39a15e8ff225b1 diff --git a/web/spush/brisk-spush.phh b/web/spush/brisk-spush.phh index 0f22baa..11e5497 100644 --- a/web/spush/brisk-spush.phh +++ b/web/spush/brisk-spush.phh @@ -52,7 +52,7 @@ class PendingPage { function PendingPage($socket, $curtime, $kalive) { $this->socket = $socket; - fprintf(STDERR, "SOCKET ADD: %s\n", $this->socket); + // fprintf(STDERR, "SOCKET ADD: %s\n", $this->socket); $this->kalive = $curtime + $kalive; } @@ -81,7 +81,7 @@ class PendingPage { function to_continuing() { - printf("TRY FLUSH CREATE\n"); + // printf("TRY FLUSH CREATE\n"); $header = array(); $header['HTTP-Response'] = "100 Continue"; $hea = headers_render($header, 0); @@ -136,7 +136,7 @@ class PendingPage { function to_flushing($enc, &$header_out, $body) { - printf("TRY FLUSH CREATE: enc[%s]\n", $enc); + // printf("TRY FLUSH CREATE: enc[%s]\n", $enc); $body_out = ZLibStream::compress($enc, $body); if ($enc != 'plain') $header_out['Content-Encoding'] = $enc; @@ -147,26 +147,26 @@ class PendingPage { $this->status = PENDINGPAGE_FLUSH; $this->msg = $hea.$body_out; $this->msg_sz = $hea_sz + $body_out_sz; - printf("TRY FLUSH CREATE: enc[%s]\n", $enc); + // printf("TRY FLUSH CREATE: enc[%s]\n", $enc); } /* return TRUE if is removable from it's list */ function try_flush($curtime) { - fprintf(STDERR, "IMPORTANT: TRY_FLUSH: start %d\n", $this->status); + // fprintf(STDERR, "IMPORTANT: TRY_FLUSH: start %d\n", $this->status); if ($this->status != PENDINGPAGE_FLUSH && $this->status != PENDINGPAGE_CONTINUE) return (FALSE); if ($this->kalive < $curtime) { - printf("TRY FLUSH CLOSE 1\n"); + // printf("TRY FLUSH CLOSE 1\n"); @fclose($this->socket); return TRUE; } $wret = @fwrite($this->socket, $this->msg, mb_strlen($this->msg, "ASCII")); if ($wret == FALSE && $wret !== FALSE) { - printf("TRY FLUSH PendingPage::try_flush: wret 0 but not FALSE [%d]\n", mb_strlen($this->msg, "ASCII")); + // printf("TRY FLUSH PendingPage::try_flush: wret 0 but not FALSE [%d]\n", mb_strlen($this->msg, "ASCII")); } if ($wret == $this->msg_sz) { if ($this->status == PENDINGPAGE_CONTINUE) { @@ -174,7 +174,7 @@ class PendingPage { return FALSE; } else { - printf("TRY FLUSH CLOSE 2\n"); + // printf("TRY FLUSH CLOSE 2\n"); fclose($this->socket); return TRUE; } @@ -182,7 +182,7 @@ class PendingPage { $this->msg_sz -= $wret; $this->msg = mb_substr($this->msg, $wret, $this->msg_sz, "ASCII"); - printf("TRY FLUSH RETURN FALSE\n"); + // printf("TRY FLUSH RETURN FALSE\n"); return FALSE; }