3 $transs = array( "iframe", "xhr", "htmlfile" );
13 for ($i = 0; $i < ob_get_level(); $i++)
19 $escpush_from = array("\\", "\"");
20 $escpush_to = array("\\\\", "\\\"");
23 GLOBAL $escpush_from, $escpush_to;
25 return str_replace($escpush_from, $escpush_to, $s);
28 if ($isstream == "true") {
30 require_once("Obj/transports.phh");
33 if (isset($transp) && $transp == "xhr") {
34 $transp = new Transport_xhr();
36 else if (isset($transp) && $transp == "htmlfile") {
37 $transp = new Transport_htmlfile();
40 $transp = new Transport_iframe();
42 $header_out = array();
45 for ($i = 0 ; $i < 4096 ; $i++) {
49 $init_string .= chr(mt_rand(65, 90));
52 $body = $transp->init("plain", $header_out, $init_string, "", "0");
54 foreach ($header_out as $key => $value) {
55 header(sprintf("%s: %s", $key, $value));
60 for ($i = 1 ; $i < 10 ; $i++) {
61 $chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%d';", $i));
73 <title>XYNT TEST01</title>
74 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
75 <script type="text/javascript" src="xynt-streaming.js"></script>
76 <script type="text/javascript" src="commons.js"></script>
78 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
80 <script type="text/javascript"><!--
81 var sess = "for_test";
84 var gst = new globst();
85 window.onload = function() {
86 xstm = new xynt_streaming(window, "<?php echo "$f_trans";?>", null /* console */, gst, 'xynt_test01_php', 'sess', sess, null, 'xynt_test01.php?isstream=true', function(com){eval(com);});
87 /* xstm.hbit_set(heartbit); */
98 for ($test = 1 ; $test <= 2 ; $test++) {
100 foreach ($transs as $trans) {
101 printf("<td style=\"padding: 8px; border: 1px solid black;\"><a href=\"?f_trans=%s&f_test=%d\">Test %s %02d</a></td>", $trans, $test, $trans, $test);
106 printf("<br>[%s]<br>Test: %d<br>", $f_trans, $f_test);