示例#1
0
 /**
  * Writes a signed varint32 to the stream.
  */
 public function putVarInt($v)
 {
     $this->put(Binary::writeVarInt($v));
 }
示例#2
0
 public function putInt($v, bool $network = false)
 {
     if ($network === true) {
         $this->buffer .= Binary::writeVarInt($v);
     } else {
         $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Binary::writeInt($v) : Binary::writeLInt($v);
     }
 }