| @@ 233-248 (lines=16) @@ | ||
| 230 | */ |
|
| 231 | protected function onRead() |
|
| 232 | { |
|
| 233 | if (!$this->policyReqNotFound) { |
|
| 234 | $d = $this->drainIfMatch("<policy-file-request/>\x00"); |
|
| 235 | if ($d === null) { // partially match |
|
| 236 | return; |
|
| 237 | } |
|
| 238 | if ($d) { |
|
| 239 | if (($FP = \PHPDaemon\Servers\FlashPolicy\Pool::getInstance($this->pool->config->fpsname->value, false)) && $FP->policyData) { |
|
| 240 | $this->write($FP->policyData . "\x00"); |
|
| 241 | } |
|
| 242 | $this->finish(); |
|
| 243 | return; |
|
| 244 | } else { |
|
| 245 | $this->policyReqNotFound = true; |
|
| 246 | } |
|
| 247 | } |
|
| 248 | start: |
|
| 249 | if ($this->finished) { |
|
| 250 | return; |
|
| 251 | } |
|
| @@ 355-370 (lines=16) @@ | ||
| 352 | */ |
|
| 353 | protected function onRead() |
|
| 354 | { |
|
| 355 | if (!$this->policyReqNotFound) { |
|
| 356 | $d = $this->drainIfMatch("<policy-file-request/>\x00"); |
|
| 357 | if ($d === null) { // partially match |
|
| 358 | return; |
|
| 359 | } |
|
| 360 | if ($d) { |
|
| 361 | if (($FP = \PHPDaemon\Servers\FlashPolicy\Pool::getInstance($this->pool->config->fpsname->value, false)) && $FP->policyData) { |
|
| 362 | $this->write($FP->policyData . "\x00"); |
|
| 363 | } |
|
| 364 | $this->finish(); |
|
| 365 | return; |
|
| 366 | } else { |
|
| 367 | $this->policyReqNotFound = true; |
|
| 368 | } |
|
| 369 | } |
|
| 370 | start: |
|
| 371 | if ($this->finished) { |
|
| 372 | return; |
|
| 373 | } |
|