PocketMine-MP
5.21.1 git-2ff647079265e7c600203af4fd902b15e99d49a4
ReliableCacheEntry.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\generic;
18
19
use
raklib\protocol\EncapsulatedPacket
;
20
use
function
microtime;
21
22
final
class
ReliableCacheEntry
{
23
24
private
float
$timestamp;
25
29
public
function
__construct
(
30
private
array $packets
31
){
32
$this->timestamp = microtime(
true
);
33
}
34
38
public
function
getPackets
() : array{
39
return $this->packets;
40
}
41
42
public
function
getTimestamp() : float{
43
return $this->timestamp;
44
}
45
}
raklib\generic\ReliableCacheEntry
Definition:
ReliableCacheEntry.php:22
raklib\generic\ReliableCacheEntry\getPackets
getPackets()
Definition:
ReliableCacheEntry.php:38
raklib\generic\ReliableCacheEntry\__construct
__construct(private array $packets)
Definition:
ReliableCacheEntry.php:29
raklib\protocol\EncapsulatedPacket
Definition:
EncapsulatedPacket.php:26
vendor
pocketmine
raklib
src
generic
ReliableCacheEntry.php
Generated by
1.9.3