Genisys  Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
Network Class Reference

Public Member Functions

 __construct (Server $server)
 
 addStatistics ($upload, $download)
 
 getUpload ()
 
 getDownload ()
 
 resetStatistics ()
 
 getInterfaces ()
 
 processInterfaces ()
 
 registerInterface (SourceInterface $interface)
 
 unregisterInterface (SourceInterface $interface)
 
 setName ($name)
 
 getName ()
 
 updateName ()
 
 registerPacket ($id, $class)
 
 getServer ()
 
 processBatch (BatchPacket $packet, Player $p)
 
 sendPacket ($address, $port, $payload)
 
 blockAddress ($address, $timeout=300)
 
 unblockAddress ($address)
 

Static Public Attributes

static $BATCH_THRESHOLD = 512
 

Member Function Documentation

blockAddress (   $address,
  $timeout = 300 
)

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

Parameters
string$address
int$timeout
getInterfaces ( )
Returns
SourceInterface[]
registerInterface ( SourceInterface  $interface)
Parameters
SourceInterface$interface
registerPacket (   $id,
  $class 
)
Parameters
int$id0-255
DataPacket$class
sendPacket (   $address,
  $port,
  $payload 
)
Parameters
string$address
int$port
string$payload
setName (   $name)

Sets the server name shown on each interface Query

Parameters
string$name
unblockAddress (   $address)

Unblocks an IP address from the main interface.

Parameters
string$address
unregisterInterface ( SourceInterface  $interface)
Parameters
SourceInterface$interface

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