PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\network\SourceInterface Interface Reference
+ Inheritance diagram for pocketmine\network\SourceInterface:
+ Collaboration diagram for pocketmine\network\SourceInterface:

Public Member Functions

 putPacket (Player $player, DataPacket $packet, $needACK=false, $immediate=true)
 
 close (Player $player, $reason="unknown reason")
 
 setName ($name)
 
 process ()
 
 shutdown ()
 
 emergencyShutdown ()
 

Detailed Description

Classes that implement this interface will be able to be attached to players

Definition at line 33 of file SourceInterface.php.

Member Function Documentation

pocketmine\network\SourceInterface::close ( Player  $player,
  $reason = "unknown reason" 
)

Terminates the connection

Parameters
Player$player
string$reason

Implemented in pocketmine\network\RakLibInterface.

pocketmine\network\SourceInterface::process ( )
Returns
bool

Implemented in pocketmine\network\RakLibInterface.

pocketmine\network\SourceInterface::putPacket ( Player  $player,
DataPacket  $packet,
  $needACK = false,
  $immediate = true 
)

Sends a DataPacket to the interface, returns an unique identifier for the packet if $needACK is true

Parameters
Player$player
DataPacket$packet
bool$needACK
bool$immediate
Returns
int

Implemented in pocketmine\network\RakLibInterface.

pocketmine\network\SourceInterface::setName (   $name)
Parameters
string$name

Implemented in pocketmine\network\RakLibInterface.


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