public function closeSession($identifier, $reason)
{
$buffer = chr(RakLib::PACKET_CLOSE_SESSION) . chr(strlen($identifier)) . $identifier . chr(strlen($reason)) . $reason;
$this->server->pushMainToThreadPacket($buffer);
}
public function close(Player $player, $reason = "unknown reason") { if (isset($this->identifiers[$h = spl_object_hash($player)])) { unset($this->players[$this->identifiers[$h]]); unset($this->identifiersACK[$this->identifiers[$h]]); $this->interface->closeSession($this->identifiers[$h], $reason); unset($this->identifiers[$h]); } }