예제 #1
0
 public function decode()
 {
     parent::decode();
     $this->seqNumber = $this->getLTriad();
     while (!$this->feof()) {
         $offset = 0;
         $packet = EncapsulatedPacket::fromBinary(substr($this->buffer, $this->offset), false, $offset);
         $this->offset += $offset;
         if (strlen($packet->buffer) === 0) {
             break;
         }
         $this->packets[] = $packet;
     }
 }
예제 #2
0
 public function decode()
 {
     parent::decode();
     $this->seqNumber = unpack("V", $this->get(3) . "")[1];
     while (!$this->feof()) {
         $offset = 0;
         $data = substr($this->buffer, $this->offset);
         $packet = EncapsulatedPacket::fromBinary($data, false, $offset);
         $this->offset += $offset;
         if (strlen($packet->buffer) === 0) {
             break;
         }
         $this->packets[] = $packet;
     }
 }