X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Ftransports.phh;h=0cc5f5431d91c123df8b8e033bad177a87c2b3d2;hb=312c8c9eff704f24fa7d8ae26b2040586bbb6418;hp=3422c2338d4fce7e8f00a5fd6711768fd36f0b47;hpb=a16d8054d9577795a6d9306570eb3a06c46da147;p=brisk.git diff --git a/web/Obj/transports.phh b/web/Obj/transports.phh index 3422c23..0cc5f54 100644 --- a/web/Obj/transports.phh +++ b/web/Obj/transports.phh @@ -94,15 +94,17 @@ 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->sendingContinuous = false; - $this->sendingContinuous = false; - $this->partialMessage = ""; - $this->hasSentClose = false; + $this->handlingPartialPacket = false; + $this->partialMessage = ""; + + $this->hasSentClose = false; } protected function extractHeaders($message) { @@ -201,6 +203,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 +491,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 +532,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 +610,9 @@ push(\"%s\");\n// -->\n", $step, escpush($cont) ); } class Transport_htmlfile extends Transport_iframe { + function Transport_htmlfile() { + $this->type = 'htmlfile'; + } } class Transport {