Network
Methods
__construct()
php
public function __construct(\Logger $logger)blockAddress()
php
public function blockAddress(string $address, int $timeout = 300) : voidBlocks an IP address from the main interface. Setting timeout to -1 will block it forever
getBandwidthTracker()
php
public function getBandwidthTracker() : \pocketmine\network\BidirectionalBandwidthStatsTrackergetConnectionCount()
php
public function getConnectionCount() : intgetInterfaces()
php
public function getInterfaces() : arraygetName()
php
public function getName() : stringgetSessionManager()
php
public function getSessionManager() : \pocketmine\network\NetworkSessionManagergetValidConnectionCount()
php
public function getValidConnectionCount() : intprocessRawPacket()
php
public function processRawPacket(\pocketmine\network\AdvancedNetworkInterface $interface, string $address, int $port, string $packet) : voidregisterInterface()
php
public function registerInterface(\pocketmine\network\NetworkInterface $interface) : boolregisterRawPacketHandler()
php
public function registerRawPacketHandler(\pocketmine\network\RawPacketHandler $handler) : voidRegisters a raw packet handler on the network.
sendPacket()
php
public function sendPacket(string $address, int $port, string $payload) : voidsetName()
php
public function setName(string $name) : voidSets the server name shown on each interface Query
tick()
php
public function tick() : voidunblockAddress()
php
public function unblockAddress(string $address) : voidunregisterInterface()
php
public function unregisterInterface(\pocketmine\network\NetworkInterface $interface) : voidunregisterRawPacketHandler()
php
public function unregisterRawPacketHandler(\pocketmine\network\RawPacketHandler $handler) : voidUnregisters a previously-registered raw packet handler.
updateName()
php
public function updateName() : void