PocketMine-MP
5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
UnconnectedPing.php
1
<?php
2
3
/*
4
* This file is part of RakLib.
5
* Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/RakLib>
6
*
7
* RakLib is not affiliated with Jenkins Software LLC nor RakNet.
8
*
9
* RakLib is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
13
*/
14
15
declare(strict_types=1);
16
17
namespace
raklib\protocol;
18
19
class
UnconnectedPing
extends
OfflineMessage
{
20
public
static
$ID =
MessageIdentifiers::ID_UNCONNECTED_PING
;
21
22
public
int
$sendPingTime;
23
public
int
$clientId;
24
25
protected
function
encodePayload(
PacketSerializer
$out) :
void
{
26
$out->putLong($this->sendPingTime);
27
$this->
writeMagic
($out);
28
$out->putLong($this->clientId);
29
}
30
31
protected
function
decodePayload
(
PacketSerializer
$in) : void{
32
$this->sendPingTime = $in->getLong();
33
$this->
readMagic
($in);
34
$this->clientId = $in->
getLong
();
35
}
36
}
pocketmine\utils\BinaryStream\getLong
getLong()
Definition
BinaryStream.php:281
raklib\protocol\OfflineMessage
Definition
OfflineMessage.php:22
raklib\protocol\OfflineMessage\writeMagic
writeMagic(BinaryStream $out)
Definition
OfflineMessage.php:42
raklib\protocol\OfflineMessage\readMagic
readMagic(BinaryStream $in)
Definition
OfflineMessage.php:35
raklib\protocol\PacketSerializer
Definition
raklib/src/protocol/PacketSerializer.php:30
raklib\protocol\UnconnectedPing
Definition
UnconnectedPing.php:19
raklib\protocol\UnconnectedPing\decodePayload
decodePayload(PacketSerializer $in)
Definition
UnconnectedPing.php:31
raklib\protocol\MessageIdentifiers\ID_UNCONNECTED_PING
const ID_UNCONNECTED_PING
Ping from an unconnected system. Reply but do not update timestamps. (internal use only)
Definition
MessageIdentifiers.php:30
vendor
pocketmine
raklib
src
protocol
UnconnectedPing.php
Generated by
1.12.0