X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2FObj%2Ftransports.phh;h=fcc5c6d23e35102346758a4bc415b9d17d29e032;hp=3422c2338d4fce7e8f00a5fd6711768fd36f0b47;hb=8b0992347fdfdb40715268bb07481d35fc5191fb;hpb=e77392cc2a719cd0f3817e9092a3978cb5de23d3 diff --git a/web/Obj/transports.phh b/web/Obj/transports.phh index 3422c23..fcc5c6d 100644 --- a/web/Obj/transports.phh +++ b/web/Obj/transports.phh @@ -94,15 +94,19 @@ class Transport_websocket { protected $magicGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; function Transport_websocket($secure = FALSE) { + $this->type = ($secure == FALSE ? "websocket" : "websocketsec"); $this->headerOriginRequired = false; $this->headerSecWebSocketProtocolRequired = false; $this->headerSecWebSocketExtensionsRequired = false; + $this->handlingPartialPacket = false; + $this->sendingContinuous = false; - $this->sendingContinuous = false; - $this->partialMessage = ""; - $this->hasSentClose = false; + $this->handlingPartialPacket = false; + $this->partialMessage = ""; + + $this->hasSentClose = false; } protected function extractHeaders($message) { @@ -201,6 +205,12 @@ class Transport_websocket { return $strout . "\n"; } + function unchunk($cont) + { + // fprintf(STDERR, "CHUNK: [%s]\n", $cont); + return $this->deframe($cont); + } + function chunk($step, $cont) { // fprintf(STDERR, "CHUNK: [%s]\n", $cont); @@ -483,6 +493,7 @@ class Transport_websocket { class Transport_xhr { function Transport_xhr() { + $this->type = 'xhr'; } function init($enc, $header, &$header_out, $init_string, $base, $step) @@ -523,6 +534,7 @@ class Transport_xhr { class Transport_iframe { function Transport_iframe() { + $this->type = 'iframe'; } function init($enc, $header, &$header_out, $init_string, $base, $step) @@ -600,6 +612,9 @@ push(\"%s\");\n// -->\n", $step, escpush($cont) ); } class Transport_htmlfile extends Transport_iframe { + function Transport_htmlfile() { + $this->type = 'htmlfile'; + } } class Transport {