@@ 231-238 (lines=8) @@ | ||
228 | $this->onUdpPacket($this->read($this->getInputLength())); |
|
229 | return; |
|
230 | } |
|
231 | if ($this->state === self::STATE_ROOT) { |
|
232 | if (false === ($hdr = $this->readExact(2))) { |
|
233 | return; // not enough data |
|
234 | } |
|
235 | $this->pctSize = Binary::bytes2int($hdr); |
|
236 | $this->setWatermark($this->pctSize); |
|
237 | $this->state = self::STATE_PACKET; |
|
238 | } |
|
239 | if ($this->state === self::STATE_PACKET) { |
|
240 | if (false === ($pct = $this->readExact($this->pctSize))) { |
|
241 | return; // not enough data |
|
@@ 239-247 (lines=9) @@ | ||
236 | $this->setWatermark($this->pctSize); |
|
237 | $this->state = self::STATE_PACKET; |
|
238 | } |
|
239 | if ($this->state === self::STATE_PACKET) { |
|
240 | if (false === ($pct = $this->readExact($this->pctSize))) { |
|
241 | return; // not enough data |
|
242 | } |
|
243 | $this->state = self::STATE_ROOT; |
|
244 | $this->setWatermark(2); |
|
245 | $this->onUdpPacket($pct); |
|
246 | return; |
|
247 | } |
|
248 | goto start; |
|
249 | } |
|
250 |