Example #1
0
 public function readInt32()
 {
     $int32 = HabboEncoding::decodeByte32($this->packet);
     $this->pop(4);
     return $int32;
 }
Example #2
0
 public function bufferParser($buffer)
 {
     $packets = array();
     while (strlen($buffer) > 3) {
         $len = HabboEncoding::decodeByte32($buffer) + 4;
         $packets[] = substr($buffer, 0, $len);
         $buffer = substr($buffer, $len);
     }
     return $packets;
 }