PHP Class pocketmine\network\Network

ファイルを表示 Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$BATCH_THRESHOLD

Public Methods

Method Description
__construct ( Server $server )
addStatistics ( $upload, $download )
blockAddress ( string $address, integer $timeout = 300 ) Blocks an IP address from the main interface. Setting timeout to -1 will block it forever
getDownload ( )
getInterfaces ( ) : pocketmine\network\SourceInterface[]
getName ( )
getPacket ( $id ) : DataPacket
getServer ( )
getUpload ( )
processBatch ( BatchPacket $packet, Player $p )
processInterfaces ( )
registerInterface ( pocketmine\network\SourceInterface $interface )
registerPacket ( integer $id, DataPacket $class )
resetStatistics ( )
sendPacket ( string $address, integer $port, string $payload )
setName ( string $name ) Sets the server name shown on each interface Query
unblockAddress ( string $address ) Unblocks an IP address from the main interface.
unregisterInterface ( pocketmine\network\SourceInterface $interface )
updateName ( )

Private Methods

Method Description
registerPackets ( )

Method Details

__construct() public method

public __construct ( Server $server )
$server pocketmine\Server

addStatistics() public method

public addStatistics ( $upload, $download )

blockAddress() public method

Blocks an IP address from the main interface. Setting timeout to -1 will block it forever
public blockAddress ( string $address, integer $timeout = 300 )
$address string
$timeout integer

getDownload() public method

public getDownload ( )

getInterfaces() public method

public getInterfaces ( ) : pocketmine\network\SourceInterface[]
return pocketmine\network\SourceInterface[]

getName() public method

public getName ( )

getPacket() public method

public getPacket ( $id ) : DataPacket
$id
return pocketmine\network\protocol\DataPacket

getServer() public method

public getServer ( )

getUpload() public method

public getUpload ( )

processBatch() public method

public processBatch ( BatchPacket $packet, Player $p )
$packet pocketmine\network\protocol\BatchPacket
$p pocketmine\Player

processInterfaces() public method

public processInterfaces ( )

registerInterface() public method

public registerInterface ( pocketmine\network\SourceInterface $interface )
$interface pocketmine\network\SourceInterface

registerPacket() public method

public registerPacket ( integer $id, DataPacket $class )
$id integer 0-255
$class pocketmine\network\protocol\DataPacket

resetStatistics() public method

public resetStatistics ( )

sendPacket() public method

public sendPacket ( string $address, integer $port, string $payload )
$address string
$port integer
$payload string

setName() public method

Sets the server name shown on each interface Query
public setName ( string $name )
$name string

unblockAddress() public method

Unblocks an IP address from the main interface.
public unblockAddress ( string $address )
$address string

unregisterInterface() public method

public unregisterInterface ( pocketmine\network\SourceInterface $interface )
$interface pocketmine\network\SourceInterface

updateName() public method

public updateName ( )

Property Details

$BATCH_THRESHOLD public_oe static_oe property

public static $BATCH_THRESHOLD