| @@ 227-242 (lines=16) @@ | ||
| 224 | * @return void |
|
| 225 | */ |
|
| 226 | protected function onRead() { |
|
| 227 | if (!$this->policyReqNotFound) { |
|
| 228 | $d = $this->drainIfMatch("<policy-file-request/>\x00"); |
|
| 229 | if ($d === null) { // partially match |
|
| 230 | return; |
|
| 231 | } |
|
| 232 | if ($d) { |
|
| 233 | if (($FP = \PHPDaemon\Servers\FlashPolicy\Pool::getInstance($this->pool->config->fpsname->value, false)) && $FP->policyData) { |
|
| 234 | $this->write($FP->policyData . "\x00"); |
|
| 235 | } |
|
| 236 | $this->finish(); |
|
| 237 | return; |
|
| 238 | } |
|
| 239 | else { |
|
| 240 | $this->policyReqNotFound = true; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | start: |
|
| 244 | if ($this->finished) { |
|
| 245 | return; |
|
| @@ 338-353 (lines=16) @@ | ||
| 335 | * @return void |
|
| 336 | */ |
|
| 337 | protected function onRead() { |
|
| 338 | if (!$this->policyReqNotFound) { |
|
| 339 | $d = $this->drainIfMatch("<policy-file-request/>\x00"); |
|
| 340 | if ($d === null) { // partially match |
|
| 341 | return; |
|
| 342 | } |
|
| 343 | if ($d) { |
|
| 344 | if (($FP = \PHPDaemon\Servers\FlashPolicy\Pool::getInstance($this->pool->config->fpsname->value, false)) && $FP->policyData) { |
|
| 345 | $this->write($FP->policyData . "\x00"); |
|
| 346 | } |
|
| 347 | $this->finish(); |
|
| 348 | return; |
|
| 349 | } |
|
| 350 | else { |
|
| 351 | $this->policyReqNotFound = true; |
|
| 352 | } |
|
| 353 | } |
|
| 354 | start: |
|
| 355 | if ($this->finished) { |
|
| 356 | return; |
|