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

Public Member Functions

 __construct (private \Logger $logger)
 
 blockAddress (string $address, int $timeout=300)
 
 getBandwidthTracker ()
 
 getConnectionCount ()
 
 getInterfaces ()
 
 getName ()
 
 getSessionManager ()
 
 getValidConnectionCount ()
 
 processRawPacket (AdvancedNetworkInterface $interface, string $address, int $port, string $packet)
 
 registerInterface (NetworkInterface $interface)
 
 registerRawPacketHandler (RawPacketHandler $handler)
 
 sendPacket (string $address, int $port, string $payload)
 
 setName (string $name)
 
 tick ()
 
 unblockAddress (string $address)
 
 unregisterInterface (NetworkInterface $interface)
 
 unregisterRawPacketHandler (RawPacketHandler $handler)
 
 updateName ()
 

Detailed Description

Definition at line 39 of file Network.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\Network::__construct ( private \Logger $logger)

Definition at line 59 of file Network.php.

Member Function Documentation

◆ blockAddress()

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

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

Definition at line 161 of file Network.php.

◆ getBandwidthTracker()

pocketmine\network\Network::getBandwidthTracker ( )

Definition at line 66 of file Network.php.

◆ getConnectionCount()

pocketmine\network\Network::getConnectionCount ( )

Definition at line 79 of file Network.php.

◆ getInterfaces()

pocketmine\network\Network::getInterfaces ( )
Returns
NetworkInterface[]

Definition at line 71 of file Network.php.

◆ getName()

pocketmine\network\Network::getName ( )

Definition at line 142 of file Network.php.

◆ getSessionManager()

pocketmine\network\Network::getSessionManager ( )

Definition at line 75 of file Network.php.

◆ getValidConnectionCount()

pocketmine\network\Network::getValidConnectionCount ( )

Definition at line 83 of file Network.php.

◆ processRawPacket()

pocketmine\network\Network::processRawPacket ( AdvancedNetworkInterface $interface,
string $address,
int $port,
string $packet )

Definition at line 194 of file Network.php.

◆ registerInterface()

pocketmine\network\Network::registerInterface ( NetworkInterface $interface)
Exceptions
NetworkInterfaceStartException

Definition at line 98 of file Network.php.

◆ registerRawPacketHandler()

pocketmine\network\Network::registerRawPacketHandler ( RawPacketHandler $handler)

Registers a raw packet handler on the network.

Definition at line 178 of file Network.php.

◆ sendPacket()

pocketmine\network\Network::sendPacket ( string $address,
int $port,
string $payload )

Definition at line 152 of file Network.php.

◆ setName()

pocketmine\network\Network::setName ( string $name)

Sets the server name shown on each interface Query

Definition at line 135 of file Network.php.

◆ tick()

pocketmine\network\Network::tick ( )

Definition at line 87 of file Network.php.

◆ unblockAddress()

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

Definition at line 168 of file Network.php.

◆ unregisterInterface()

pocketmine\network\Network::unregisterInterface ( NetworkInterface $interface)
Exceptions

InvalidArgumentException

Definition at line 123 of file Network.php.

◆ unregisterRawPacketHandler()

pocketmine\network\Network::unregisterRawPacketHandler ( RawPacketHandler $handler)

Unregisters a previously-registered raw packet handler.

Definition at line 190 of file Network.php.

◆ updateName()

pocketmine\network\Network::updateName ( )

Definition at line 146 of file Network.php.


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