PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
|
Public Member Functions | |
__construct (Server $server, string $ip, int $port, bool $ipV6, PacketBroadcaster $packetBroadcaster, EntityEventBroadcaster $entityEventBroadcaster, TypeConverter $typeConverter) | |
addRawPacketFilter (string $regex) | |
blockAddress (string $address, int $timeout=300) | |
close (int $sessionId) | |
onBandwidthStatsUpdate (int $bytesSentDiff, int $bytesReceivedDiff) | |
onClientConnect (int $sessionId, string $address, int $port, int $clientID) | |
onClientDisconnect (int $sessionId, int $reason) | |
onPacketAck (int $sessionId, int $identifierACK) | |
onPacketReceive (int $sessionId, string $packet) | |
onPingMeasure (int $sessionId, int $pingMS) | |
onRawPacketReceive (string $address, int $port, string $payload) | |
putPacket (int $sessionId, string $payload, bool $immediate=true, ?int $receiptId=null) | |
sendRawPacket (string $address, int $port, string $payload) | |
setName (string $name) | |
setNetwork (Network $network) | |
setPacketLimit (int $limit) | |
setPortCheck (bool $name) | |
shutdown () | |
start () | |
tick () | |
unblockAddress (string $address) | |
Definition at line 61 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::__construct | ( | Server | $server, |
string | $ip, | ||
int | $port, | ||
bool | $ipV6, | ||
PacketBroadcaster | $packetBroadcaster, | ||
EntityEventBroadcaster | $entityEventBroadcaster, | ||
TypeConverter | $typeConverter | ||
) |
Definition at line 88 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::addRawPacketFilter | ( | string | $regex | ) |
Adds a regex filter for raw packets to this network interface. This filter should be used to check validity of raw packets before relaying them to the main thread.
Implements pocketmine\network\AdvancedNetworkInterface.
Definition at line 250 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::blockAddress | ( | string | $address, |
int | $timeout = 300 |
||
) |
Prevents packets received from the IP address getting processed for the given timeout.
int | $timeout | Seconds |
Implements pocketmine\network\AdvancedNetworkInterface.
Definition at line 234 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::close | ( | int | $sessionId | ) |
Definition at line 174 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onBandwidthStatsUpdate | ( | int | $bytesSentDiff, |
int | $bytesReceivedDiff | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 290 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onClientConnect | ( | int | $sessionId, |
string | $address, | ||
int | $port, | ||
int | $clientID | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 186 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onClientDisconnect | ( | int | $sessionId, |
int | $reason | ||
) |
int | $reason | one of the DisconnectReason constants @phpstan-param DisconnectReason::* $reason |
Implements raklib\server\ServerEventListener.
Definition at line 161 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onPacketAck | ( | int | $sessionId, |
int | $identifierACK | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 254 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onPacketReceive | ( | int | $sessionId, |
string | $packet | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 202 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onPingMeasure | ( | int | $sessionId, |
int | $pingMS | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 306 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::onRawPacketReceive | ( | string | $address, |
int | $port, | ||
string | $payload | ||
) |
Implements raklib\server\ServerEventListener.
Definition at line 242 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::putPacket | ( | int | $sessionId, |
string | $payload, | ||
bool | $immediate = true , |
||
?int | $receiptId = null |
||
) |
Definition at line 294 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::sendRawPacket | ( | string | $address, |
int | $port, | ||
string | $payload | ||
) |
Sends a raw payload to the network interface, bypassing any sessions.
Implements pocketmine\network\AdvancedNetworkInterface.
Definition at line 246 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::setName | ( | string | $name | ) |
Implements pocketmine\network\NetworkInterface.
Definition at line 260 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::setNetwork | ( | Network | $network | ) |
Implements pocketmine\network\AdvancedNetworkInterface.
Definition at line 147 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::setPacketLimit | ( | int | $limit | ) |
Definition at line 286 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::setPortCheck | ( | bool | $name | ) |
Definition at line 282 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::shutdown | ( | ) |
Gracefully shuts down the network interface.
Implements pocketmine\network\NetworkInterface.
Definition at line 181 of file RakLibInterface.php.
References pocketmine\server().
pocketmine\network\mcpe\raklib\RakLibInterface::start | ( | ) |
Performs actions needed to start the interface after it is registered.
NetworkInterfaceStartException |
Implements pocketmine\network\NetworkInterface.
Definition at line 137 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::tick | ( | ) |
Called every tick to process events on the interface.
Implements pocketmine\network\NetworkInterface.
Definition at line 151 of file RakLibInterface.php.
pocketmine\network\mcpe\raklib\RakLibInterface::unblockAddress | ( | string | $address | ) |
Unblocks a previously-blocked address.
Implements pocketmine\network\AdvancedNetworkInterface.
Definition at line 238 of file RakLibInterface.php.