Skip to content

Network ​

class · pocketmine\network\Network · source

Methods ​

__construct() ​

php
public function __construct(\Logger $logger)

blockAddress() ​

php
public function blockAddress(string $address, int $timeout = 300) : void

Blocks an IP address from the main interface. Setting timeout to -1 will block it forever

getBandwidthTracker() ​

php
public function getBandwidthTracker() : \pocketmine\network\BidirectionalBandwidthStatsTracker

getConnectionCount() ​

php
public function getConnectionCount() : int

getInterfaces() ​

php
public function getInterfaces() : array

getName() ​

php
public function getName() : string

getSessionManager() ​

php
public function getSessionManager() : \pocketmine\network\NetworkSessionManager

getValidConnectionCount() ​

php
public function getValidConnectionCount() : int

processRawPacket() ​

php
public function processRawPacket(\pocketmine\network\AdvancedNetworkInterface $interface, string $address, int $port, string $packet) : void

registerInterface() ​

php
public function registerInterface(\pocketmine\network\NetworkInterface $interface) : bool

registerRawPacketHandler() ​

php
public function registerRawPacketHandler(\pocketmine\network\RawPacketHandler $handler) : void

Registers a raw packet handler on the network.

sendPacket() ​

php
public function sendPacket(string $address, int $port, string $payload) : void

setName() ​

php
public function setName(string $name) : void

Sets the server name shown on each interface Query

tick() ​

php
public function tick() : void

unblockAddress() ​

php
public function unblockAddress(string $address) : void

unregisterInterface() ​

php
public function unregisterInterface(\pocketmine\network\NetworkInterface $interface) : void

unregisterRawPacketHandler() ​

php
public function unregisterRawPacketHandler(\pocketmine\network\RawPacketHandler $handler) : void

Unregisters a previously-registered raw packet handler.

updateName() ​

php
public function updateName() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.