X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxynt_test01.php;h=4c1c43bab19cfbb44071ae5bb3b2afee4a30f431;hb=fc19a0f063cf2e544a61a58b4ac31254f91d6ba5;hp=01adb539114ed0db22e90e7c2ddd31bc7de3cabc;hpb=9878243b4e002b50ee444cf906b9e13faba4fe01;p=brisk.git diff --git a/web/xynt_test01.php b/web/xynt_test01.php index 01adb53..4c1c43b 100644 --- a/web/xynt_test01.php +++ b/web/xynt_test01.php @@ -1,4 +1,10 @@ 80, "websocket"=>80, "websocketsec"=>443, "xhr"=>80, "htmlfile"=>80 ); if (!isset($f_trans)) $f_trans = $transs[0]; @@ -70,7 +77,7 @@ if (!isset($f_test)) $f_test = 1; if (!isset($f_port)) - $f_port = 80; + $f_port = NULL; if (!isset($f_fback)) $f_fback = 0; @@ -102,12 +109,14 @@ function xcape($s) } if (isset($isstream) && $isstream == "true") { - require_once("Obj/transports.phh"); if (isset($transp) && $transp == "websocket") { $trobj = new Transport_websocket(); } + else if (isset($transp) && $transp == "websocketsec") { + $trobj = new Transport_websocket(TRUE); + } else if (isset($transp) && $transp == "xhr") { $trobj = new Transport_xhr(); } @@ -127,6 +136,7 @@ if (isset($isstream) && $isstream == "true") { $init_string .= chr(mt_rand(65, 90)); } $headers_in = getallheaders(); + // error_log(print_r($headers_in, TRUE)); $headers = array(); foreach ($headers_in as $header_in => $value) { $headers[mb_convert_case($header_in, MB_CASE_TITLE, 'UTF-8')] = $value; @@ -149,7 +159,7 @@ if (isset($isstream) && $isstream == "true") { fclose($fp); } - if (isset($transp) && $transp == "websocket") { + if (isset($transp) && ($transp == "websocket" || $transp == "websocketsec")) { header_remove('Connection'); header_remove('Content-Encoding'); header_remove('Content-Type'); @@ -290,7 +300,8 @@ if (isset($isstream) && $isstream == "true") { var gst = new globst(); window.onload = function() { - xstm = new xynt_streaming(window, "", , , console, gst, 'xynt_test01_php', 'sess', sess, null, 'xynt_test01.php?isstream=true&f_test=', function(com){eval(com);}); + xstm = new xynt_streaming(window, "", , , console, gst, 'xynt_test01_php', 'sess', sess, null, 'xynt_test01.php?isstream=true&f_test=', function(com){eval(com);}); xstm.hbit_set(heartbit); xstm.start(); } @@ -301,13 +312,13 @@ if (isset($isstream) && $isstream == "true") {
"); for ($test = 1 ; $test <= count($desc) ; $test++) { printf(""); foreach ($transs as $trans) { - printf("Test %s %02d (port %d (fb %d))", $trans, $test, $f_port, $f_fback, $trans, $test, $f_port, $f_fback); + printf("Test %s %02d (port %d (fb %d))", $trans, $test, + ($f_port == NULL ? "" : sprintf("&f_port=%d", $f_port)), $f_fback, $trans, $test, + ($f_port == NULL ? $trans_ports[$trans] : $f_port ), $f_fback); } printf("\n"); }