X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Ftransports.phh;h=a77fad7a1cfb28c87665e219ba4c142281ee3bf0;hb=9a17da4020740578e3a744630fd6be96c8237cab;hp=fcf16318f1312e6cdbebe8feeef7b2fe528d3674;hpb=087d3262b6c01417dad7b9eb365374fe5a9f2ba1;p=brisk.git diff --git a/web/Obj/transports.phh b/web/Obj/transports.phh index fcf1631..a77fad7 100644 --- a/web/Obj/transports.phh +++ b/web/Obj/transports.phh @@ -22,6 +22,37 @@ * */ +/* + * test: SO x Browser + * Values: Y: works, N: not works, @: continuous download, + * D: continuous download after first reload + * + * Stream IFRAME: + * + * Iframe| IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | D | | @ | | @ | x + * Win | x | D | @ | @ | | D + * Mac | x | | | | | + * + * + * XHR | IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | Y | | ^D | | Y | x + * Win | x | Y | Y | | | N + * Mac | x | | | | | + * + * + * HtmlFl| IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | N | | | | N | + * Win | x | N | N | | | Y* (* seems delay between click and load of a new page) + * Mac | x | | | | | + * + * + */ + + class Transport_template { function Transport_template() { @@ -38,6 +69,10 @@ class Transport_template { function chunk($step, $cont) { } + + function is_chunked() + { + } } class Transport_xhr { @@ -59,6 +94,7 @@ class Transport_xhr { static function fini($init_string, $base, $blockerr) { + return (sprintf('@BEGIN@ %s window.onbeforeunload = null; window.onunload = null; document.location.assign("%sindex.php"); @END@', ($blockerr ? 'xstm.stop(); ' : ''), $base)); return (""); } @@ -66,6 +102,11 @@ class Transport_xhr { { return ("@BEGIN@".$cont."@END@"); } + + function is_chunked() + { + return TRUE; + } } class Transport_iframe { @@ -92,7 +133,7 @@ var xynt_streaming = \"ready\";", $base, $base); if ($step > 0) $ret .= sprintf("last_clean = %d;\n", ($step-1)); $ret .= sprintf(" -window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } }; +window.onload = function () { try { if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true; } } catch(e) { /* console.log(\"catcha\"); */ } }; "); @@ -111,7 +152,7 @@ window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming. "); @@ -134,9 +175,41 @@ push(null);\n// -->\n", $step); push(\"%s\");\n// -->\n", $step, escpush($cont) ); } } + + function is_chunked() + { + return TRUE; + } } class Transport_htmlfile extends Transport_iframe { } +class Transport { + function Transport() + { + } + + static function create($transp) + { + if ($transp == 'xhr') { + return new Transport_xhr(); + } + else if ($transp == 'htmlfile') { + return new Transport_htmlfile(); + } + else { + return new Transport_iframe(); + } + } + static function gettype($transp) + { + if ($transp == 'xhr' || $transp == 'htmlfile') { + return "Transport_".$transp; + } + else { + return 'Transport_iframe'; + } + } +} ?> \ No newline at end of file