PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
raklib\protocol\PacketSerializer Class Reference
+ Inheritance diagram for raklib\protocol\PacketSerializer:
+ Collaboration diagram for raklib\protocol\PacketSerializer:

Public Member Functions

 feof ()
 
 get (int $len)
 
 getAddress ()
 
 getBool ()
 
 getBuffer ()
 
 getByte ()
 
 getDouble ()
 
 getFloat ()
 
 getInt ()
 
 getLDouble ()
 
 getLFloat ()
 
 getLInt ()
 
 getLLong ()
 
 getLong ()
 
 getLShort ()
 
 getLTriad ()
 
 getOffset ()
 
 getRemaining ()
 
 getRoundedFloat (int $accuracy)
 
 getRoundedLFloat (int $accuracy)
 
 getShort ()
 
 getSignedLShort ()
 
 getSignedShort ()
 
 getString ()
 
 getTriad ()
 
 getUnsignedVarInt ()
 
 getUnsignedVarLong ()
 
 getVarInt ()
 
 getVarLong ()
 
 put (string $str)
 
 putAddress (InternetAddress $address)
 
 putBool (bool $v)
 
 putByte (int $v)
 
 putDouble (float $v)
 
 putFloat (float $v)
 
 putInt (int $v)
 
 putLDouble (float $v)
 
 putLFloat (float $v)
 
 putLInt (int $v)
 
 putLLong (int $v)
 
 putLong (int $v)
 
 putLShort (int $v)
 
 putLTriad (int $v)
 
 putShort (int $v)
 
 putString (string $v)
 
 putTriad (int $v)
 
 putUnsignedVarInt (int $v)
 
 putUnsignedVarLong (int $v)
 
 putVarInt (int $v)
 
 putVarLong (int $v)
 
 rewind ()
 
 setOffset (int $offset)
 

Protected Attributes

 $buffer
 
 $offset
 

Detailed Description

Definition at line 30 of file raklib/src/protocol/PacketSerializer.php.

Member Function Documentation

◆ feof()

pocketmine\utils\BinaryStream::feof ( )
inherited

Returns whether the offset has reached the end of the buffer.

Definition at line 372 of file BinaryStream.php.

◆ get()

pocketmine\utils\BinaryStream::get ( int $len)
inherited

@phpstan-impure

Exceptions
BinaryDataExceptionif there are not enough bytes left in the buffer

Definition at line 67 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\serializer\PacketBatch\decodeRaw(), pocketmine\world\format\io\leveldb\LevelDB\deserializeBlockPalette(), and raklib\protocol\OfflineMessage\readMagic().

+ Here is the caller graph for this function:

◆ getAddress()

raklib\protocol\PacketSerializer::getAddress ( )
Exceptions
BinaryDataException

Definition at line 42 of file raklib/src/protocol/PacketSerializer.php.

◆ getBool()

pocketmine\utils\BinaryStream::getBool ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 105 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CommandBlockUpdatePacket\decodePayload(), and pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getBuffer()

pocketmine\utils\BinaryStream::getBuffer ( )
inherited

Definition at line 59 of file BinaryStream.php.

◆ getByte()

pocketmine\utils\BinaryStream::getByte ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 117 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\BookEditPacket\decodePayload(), pocketmine\network\mcpe\protocol\SetHudPacket\decodePayload(), raklib\protocol\AcknowledgePacket\decodePayload(), and pocketmine\network\mcpe\protocol\AvailableCommandsPacket\getEnumValueIndex().

+ Here is the caller graph for this function:

◆ getDouble()

pocketmine\utils\BinaryStream::getDouble ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 257 of file BinaryStream.php.

◆ getFloat()

pocketmine\utils\BinaryStream::getFloat ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 217 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CorrectPlayerMovePredictionPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getInt()

pocketmine\utils\BinaryStream::getInt ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 193 of file BinaryStream.php.

◆ getLDouble()

pocketmine\utils\BinaryStream::getLDouble ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 269 of file BinaryStream.php.

◆ getLFloat()

pocketmine\utils\BinaryStream::getLFloat ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 237 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\AddActorPacket\decodePayload(), pocketmine\network\mcpe\protocol\AnimatePacket\decodePayload(), pocketmine\network\mcpe\protocol\BossEventPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), and pocketmine\network\mcpe\protocol\InteractPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLInt()

pocketmine\utils\BinaryStream::getLInt ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 205 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\MovePlayerPacket\decodePayload(), and pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLLong()

pocketmine\utils\BinaryStream::getLLong ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 293 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientCacheBlobStatusPacket\decodePayload(), and pocketmine\network\mcpe\protocol\ClientCacheMissResponsePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLong()

pocketmine\utils\BinaryStream::getLong ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 281 of file BinaryStream.php.

◆ getLShort()

pocketmine\utils\BinaryStream::getLShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 149 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\BossEventPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLTriad()

pocketmine\utils\BinaryStream::getLTriad ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 181 of file BinaryStream.php.

Referenced by raklib\protocol\AcknowledgePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getOffset()

pocketmine\utils\BinaryStream::getOffset ( )
inherited

Definition at line 55 of file BinaryStream.php.

◆ getRemaining()

pocketmine\utils\BinaryStream::getRemaining ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 87 of file BinaryStream.php.

◆ getRoundedFloat()

pocketmine\utils\BinaryStream::getRoundedFloat ( int $accuracy)
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 225 of file BinaryStream.php.

◆ getRoundedLFloat()

pocketmine\utils\BinaryStream::getRoundedLFloat ( int $accuracy)
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 245 of file BinaryStream.php.

◆ getShort()

pocketmine\utils\BinaryStream::getShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 129 of file BinaryStream.php.

◆ getSignedLShort()

pocketmine\utils\BinaryStream::getSignedLShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 157 of file BinaryStream.php.

◆ getSignedShort()

pocketmine\utils\BinaryStream::getSignedShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 137 of file BinaryStream.php.

◆ getString()

raklib\protocol\PacketSerializer::getString ( )
Exceptions
BinaryDataException

Definition at line 35 of file raklib/src/protocol/PacketSerializer.php.

◆ getTriad()

pocketmine\utils\BinaryStream::getTriad ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 169 of file BinaryStream.php.

◆ getUnsignedVarInt()

pocketmine\utils\BinaryStream::getUnsignedVarInt ( )
inherited

◆ getUnsignedVarLong()

pocketmine\utils\BinaryStream::getUnsignedVarLong ( )
inherited

Reads a 64-bit variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 341 of file BinaryStream.php.

◆ getVarInt()

pocketmine\utils\BinaryStream::getVarInt ( )
inherited

Reads a 32-bit zigzag-encoded variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 324 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CraftingDataPacket\decodePayload(), and pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction\read().

+ Here is the caller graph for this function:

◆ getVarLong()

pocketmine\utils\BinaryStream::getVarLong ( )
inherited

Reads a 64-bit zigzag-encoded variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 358 of file BinaryStream.php.

◆ put()

pocketmine\utils\BinaryStream::put ( string $str)
inherited

Definition at line 97 of file BinaryStream.php.

◆ putAddress()

raklib\protocol\PacketSerializer::putAddress ( InternetAddress $address)

Definition at line 69 of file raklib/src/protocol/PacketSerializer.php.

◆ putBool()

pocketmine\utils\BinaryStream::putBool ( bool $v)
inherited

Definition at line 109 of file BinaryStream.php.

◆ putByte()

pocketmine\utils\BinaryStream::putByte ( int $v)
inherited

Definition at line 121 of file BinaryStream.php.

◆ putDouble()

pocketmine\utils\BinaryStream::putDouble ( float $v)
inherited

Definition at line 261 of file BinaryStream.php.

◆ putFloat()

pocketmine\utils\BinaryStream::putFloat ( float $v)
inherited

Definition at line 229 of file BinaryStream.php.

◆ putInt()

pocketmine\utils\BinaryStream::putInt ( int $v)
inherited

Definition at line 197 of file BinaryStream.php.

◆ putLDouble()

pocketmine\utils\BinaryStream::putLDouble ( float $v)
inherited

Definition at line 273 of file BinaryStream.php.

◆ putLFloat()

pocketmine\utils\BinaryStream::putLFloat ( float $v)
inherited

Definition at line 249 of file BinaryStream.php.

◆ putLInt()

pocketmine\utils\BinaryStream::putLInt ( int $v)
inherited

Definition at line 209 of file BinaryStream.php.

◆ putLLong()

pocketmine\utils\BinaryStream::putLLong ( int $v)
inherited

Definition at line 297 of file BinaryStream.php.

◆ putLong()

pocketmine\utils\BinaryStream::putLong ( int $v)
inherited

Definition at line 285 of file BinaryStream.php.

◆ putLShort()

pocketmine\utils\BinaryStream::putLShort ( int $v)
inherited

Definition at line 161 of file BinaryStream.php.

◆ putLTriad()

pocketmine\utils\BinaryStream::putLTriad ( int $v)
inherited

Definition at line 185 of file BinaryStream.php.

◆ putShort()

pocketmine\utils\BinaryStream::putShort ( int $v)
inherited

Definition at line 141 of file BinaryStream.php.

◆ putString()

raklib\protocol\PacketSerializer::putString ( string $v)

Definition at line 64 of file raklib/src/protocol/PacketSerializer.php.

◆ putTriad()

pocketmine\utils\BinaryStream::putTriad ( int $v)
inherited

Definition at line 173 of file BinaryStream.php.

◆ putUnsignedVarInt()

◆ putUnsignedVarLong()

pocketmine\utils\BinaryStream::putUnsignedVarLong ( int $v)
inherited

Writes a 64-bit variable-length integer to the end of the buffer.

Definition at line 348 of file BinaryStream.php.

◆ putVarInt()

pocketmine\utils\BinaryStream::putVarInt ( int $v)
inherited

Writes a 32-bit zigzag-encoded variable-length integer to the end of the buffer.

Definition at line 331 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CraftingDataPacket\encodePayload(), and pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction\write().

+ Here is the caller graph for this function:

◆ putVarLong()

pocketmine\utils\BinaryStream::putVarLong ( int $v)
inherited

Writes a 64-bit zigzag-encoded variable-length integer to the end of the buffer.

Definition at line 365 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\SetScoreboardIdentityPacket\encodePayload(), and pocketmine\network\mcpe\protocol\SetScorePacket\encodePayload().

+ Here is the caller graph for this function:

◆ rewind()

pocketmine\utils\BinaryStream::rewind ( )
inherited

Rewinds the stream pointer to the start.

Definition at line 47 of file BinaryStream.php.

◆ setOffset()

pocketmine\utils\BinaryStream::setOffset ( int $offset)
inherited

Definition at line 51 of file BinaryStream.php.

Member Data Documentation

◆ $buffer

pocketmine\utils\BinaryStream::$buffer
protectedinherited

Definition at line 37 of file BinaryStream.php.

◆ $offset

pocketmine\utils\BinaryStream::$offset
protectedinherited

Definition at line 35 of file BinaryStream.php.


The documentation for this class was generated from the following file: