AdvancedNetworkInterface
Extends NetworkInterface
Advanced network interfaces have some additional capabilities, such as being able to ban addresses and process raw packets.
Methods
addRawPacketFilter()
php
public function addRawPacketFilter(string $regex) : voidAdds 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.
blockAddress()
php
public function blockAddress(string $address, int $timeout = 300) : voidPrevents packets received from the IP address getting processed for the given timeout.
sendRawPacket()
php
public function sendRawPacket(string $address, int $port, string $payload) : voidSends a raw payload to the network interface, bypassing any sessions.
setNetwork()
php
public function setNetwork(\pocketmine\network\Network $network) : voidunblockAddress()
php
public function unblockAddress(string $address) : voidUnblocks a previously-blocked address.
