PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\network\AdvancedNetworkInterface Interface Reference
+ Inheritance diagram for pocketmine\network\AdvancedNetworkInterface:
+ Collaboration diagram for pocketmine\network\AdvancedNetworkInterface:

Public Member Functions

 addRawPacketFilter (string $regex)
 
 blockAddress (string $address, int $timeout=300)
 
 sendRawPacket (string $address, int $port, string $payload)
 
 setName (string $name)
 
 setNetwork (Network $network)
 
 shutdown ()
 
 start ()
 
 tick ()
 
 unblockAddress (string $address)
 

Detailed Description

Advanced network interfaces have some additional capabilities, such as being able to ban addresses and process raw packets.

Definition at line 33 of file AdvancedNetworkInterface.php.

Member Function Documentation

◆ addRawPacketFilter()

pocketmine\network\AdvancedNetworkInterface::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.

Implemented in pocketmine\network\mcpe\raklib\RakLibInterface, and pocketmine\network\query\DedicatedQueryNetworkInterface.

◆ blockAddress()

pocketmine\network\AdvancedNetworkInterface::blockAddress ( string $address,
int $timeout = 300 )

Prevents packets received from the IP address getting processed for the given timeout.

Parameters
int$timeoutSeconds

Implemented in pocketmine\network\mcpe\raklib\RakLibInterface, and pocketmine\network\query\DedicatedQueryNetworkInterface.

◆ sendRawPacket()

pocketmine\network\AdvancedNetworkInterface::sendRawPacket ( string $address,
int $port,
string $payload )

Sends a raw payload to the network interface, bypassing any sessions.

Implemented in pocketmine\network\mcpe\raklib\RakLibInterface, and pocketmine\network\query\DedicatedQueryNetworkInterface.

◆ shutdown()

pocketmine\network\NetworkInterface::shutdown ( )
inherited

◆ start()

pocketmine\network\NetworkInterface::start ( )
inherited

Performs actions needed to start the interface after it is registered.

Exceptions
NetworkInterfaceStartException

Implemented in pocketmine\network\mcpe\raklib\RakLibInterface, pocketmine\network\query\DedicatedQueryNetworkInterface, and pocketmine\network\upnp\UPnPNetworkInterface.

◆ tick()

pocketmine\network\NetworkInterface::tick ( )
inherited

◆ unblockAddress()

pocketmine\network\AdvancedNetworkInterface::unblockAddress ( string $address)

The documentation for this interface was generated from the following file: