Sent by the client to the server in response to KeepAliveRequestPacket to ensure it is still connected.
◆ __construct()
Phpcraft\Packet\KeepAliveResponsePacket::__construct |
( |
|
$keepAliveId | ) |
|
- Parameters
-
GMP | string | integer | $keepAliveId | The identifier of the keep alive request packet this response is for. |
◆ __toString()
Phpcraft\Packet\KeepAliveResponsePacket::__toString |
( |
| ) |
|
◆ read()
static Phpcraft\Packet\KeepAliveResponsePacket::read |
( |
Connection |
$con | ) |
|
|
static |
◆ send()
Phpcraft\Packet\KeepAliveResponsePacket::send |
( |
Connection |
$con | ) |
|
Adds the packet's ID and payload to the Connection's write buffer and sends it over the wire if the connection has a stream. Note that in some cases this will produce multiple Minecraft packets, therefore you should only use this on connections without a stream if you know what you're doing.
- Parameters
-
- Returns
- void
- Exceptions
-
Reimplemented from Phpcraft\Packet\Packet.
◆ $keepAliveId
GMP Phpcraft\Packet\KeepAliveResponsePacket::$keepAliveId |
The identifier of this keep alive packet.