PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
add (NetworkSession $session) | |
close (Translatable|string $reason="", Translatable|string|null $disconnectScreenMessage=null) | |
getSessionCount () | |
getSessions () | |
getValidSessionCount () | |
markLoginReceived (NetworkSession $session) | |
remove (NetworkSession $session) | |
tick () | |
Definition at line 31 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::add | ( | NetworkSession | $session | ) |
Adds a network session to the manager. This should only be called on session creation.
Definition at line 42 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::close | ( | Translatable|string | $reason = "", |
Translatable|string|null | $disconnectScreenMessage = null ) |
Terminates all connected sessions with the given reason.
Translatable | string | $reason | Shown in the server log - this should be a short one-line message |
Translatable | string | null | $disconnectScreenMessage | Shown on the player's disconnection screen (null will use the reason) |
Definition at line 103 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::getSessionCount | ( | ) |
Returns the number of known connected sessions, including sessions which have not yet sent a login request.
Definition at line 70 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::getSessions | ( | ) |
Definition at line 83 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::getValidSessionCount | ( | ) |
Returns the number of connected sessions which have either sent a login request, or have already completed the login sequence.
Definition at line 78 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::markLoginReceived | ( | NetworkSession | $session | ) |
Marks the session as having sent a login request. After this point, they are counted towards the total player count.
Definition at line 52 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::remove | ( | NetworkSession | $session | ) |
Removes the given network session, due to disconnect. This should only be called by a network session on disconnection.
Definition at line 61 of file NetworkSessionManager.php.
pocketmine\network\NetworkSessionManager::tick | ( | ) |
Updates all sessions which need it.
Definition at line 88 of file NetworkSessionManager.php.