PocketMine-MP
5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
ConnectedPing.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
ConnectedPing
extends
ConnectedPacket
{
20
public
static
$ID =
MessageIdentifiers::ID_CONNECTED_PING
;
21
22
public
int
$sendPingTime;
23
24
public
static
function
create(
int
$sendPingTime) :
self
{
25
$result =
new
self
;
26
$result->sendPingTime = $sendPingTime;
27
return
$result;
28
}
29
30
protected
function
encodePayload(
PacketSerializer
$out) :
void
{
31
$out->putLong($this->sendPingTime);
32
}
33
34
protected
function
decodePayload
(
PacketSerializer
$in) : void{
35
$this->sendPingTime = $in->getLong();
36
}
37
}
raklib\protocol\ConnectedPacket
Definition
ConnectedPacket.php:22
raklib\protocol\ConnectedPing
Definition
ConnectedPing.php:19
raklib\protocol\ConnectedPing\decodePayload
decodePayload(PacketSerializer $in)
Definition
ConnectedPing.php:34
raklib\protocol\PacketSerializer
Definition
raklib/src/protocol/PacketSerializer.php:30
raklib\protocol\MessageIdentifiers\ID_CONNECTED_PING
const ID_CONNECTED_PING
Definition
MessageIdentifiers.php:28
vendor
pocketmine
raklib
src
protocol
ConnectedPing.php
Generated by
1.12.0