X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxynt_test01.php;h=6673d34e3111f109bf3e215303e4d1e494056e0b;hb=b41e2233431a8862b741c7eb4c998c1a47263ed7;hp=f9efb7b35376421b61a93d3b332dda9e99ad0ae6;hpb=93f201e82b6497b86245817a170904151b6b06ac;p=brisk.git diff --git a/web/xynt_test01.php b/web/xynt_test01.php index f9efb7b..6673d34 100644 --- a/web/xynt_test01.php +++ b/web/xynt_test01.php @@ -8,7 +8,7 @@ $desc = array( "Semplice: da 1 a 9 ogni secondo, poi ricomincia (status sempre v "Reload limiter: da 1 a 8 ogni secondo e chiude, 9 setta e chiude subito,
il client aspetta 3 secondi, e poi da 10 a N ogni secondo, (status sempre verde)."); -$transs = array( "iframe", "xhr", "htmlfile" ); +$transs = array( "iframe", "websocket", "xhr", "htmlfile" ); if (!isset($f_trans)) $f_trans = $transs[0]; @@ -46,7 +46,10 @@ if ($isstream == "true") { require_once("Obj/transports.phh"); - if (isset($transp) && $transp == "xhr") { + if (isset($transp) && $transp == "websocket") { + $transp = new Transport_websocket(); + } + else if (isset($transp) && $transp == "xhr") { $transp = new Transport_xhr(); } else if (isset($transp) && $transp == "htmlfile") { @@ -64,8 +67,9 @@ if ($isstream == "true") { else $init_string .= chr(mt_rand(65, 90)); } + $header = array(); - $body = $transp->init("plain", $header_out, $init_string, "", "0"); + $body = $transp->init("plain", $header, $header_out, $init_string, "", "0"); foreach ($header_out as $key => $value) { header(sprintf("%s: %s", $key, $value));