projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http_streaming poll relaxed from 200 to 300 millisec
[brisk.git]
/
web
/
spush
/
brisk-spush.phh
diff --git
a/web/spush/brisk-spush.phh
b/web/spush/brisk-spush.phh
index
de6ceba
..
f0bcfcb
100644
(file)
--- a/
web/spush/brisk-spush.phh
+++ b/
web/spush/brisk-spush.phh
@@
-34,9
+34,10
@@
class PageFlush {
function PageFlush($socket, $curtime, $kalive, $header_out, $body)
{
function PageFlush($socket, $curtime, $kalive, $header_out, $body)
{
+ printf("TRY FLUSH CREATE\n");
// $body_sz = mb_strlen($body, "ASCII");
// add length to header_out
// $body_sz = mb_strlen($body, "ASCII");
// add length to header_out
- $hea = headers_render($header_out);
+ $hea = headers_render($header_out
, 0
);
$this->socket = $socket;
$this->kalive = $curtime + $kalive;
$this->socket = $socket;
$this->kalive = $curtime + $kalive;
@@
-47,22
+48,27
@@
class PageFlush {
/* return TRUE if is removable from it's list */
function try_flush($curtime)
{
/* return TRUE if is removable from it's list */
function try_flush($curtime)
{
+ printf("TRY FLUSH IN\n");
if ($this->kalive < $curtime) {
if ($this->kalive < $curtime) {
+ printf("TRY FLUSH CLOSE 1\n");
fclose($this->socket);
return TRUE;
}
$wret = @fwrite($this->socket, $this->msg);
if ($wret == FALSE && $wret !== FALSE) {
fclose($this->socket);
return TRUE;
}
$wret = @fwrite($this->socket, $this->msg);
if ($wret == FALSE && $wret !== FALSE) {
- printf("PageFlush::try_flush: wret 0 but not FALSE\n");
+ printf("
TRY FLUSH
PageFlush::try_flush: wret 0 but not FALSE\n");
}
if ($wret == $this->msg_sz) {
}
if ($wret == $this->msg_sz) {
+ printf("TRY FLUSH CLOSE 2\n");
fclose($this->socket);
return TRUE;
}
$this->msg_sz -= $wret;
$this->msg = mb_substr($this->msg, $wret, $this->msg_sz, "ASCII");
fclose($this->socket);
return TRUE;
}
$this->msg_sz -= $wret;
$this->msg = mb_substr($this->msg, $wret, $this->msg_sz, "ASCII");
+ printf("TRY FLUSH RETURN FALSE\n");
+
return FALSE;
}
return FALSE;
}