示例#1
0
 /**
  * Reads a signed varint32 from the stream.
  */
 public function getVarInt()
 {
     return Binary::readVarInt($this);
 }
示例#2
0
 public function getInt(bool $network = false)
 {
     if ($network === true) {
         return Binary::readVarInt($this);
     }
     return $this->endianness === self::BIG_ENDIAN ? Binary::readInt($this->get(4)) : Binary::readLInt($this->get(4));
 }