| 
    PocketMine-MP 5.37.1 git-cef37e7835c666594588f957a47b27d521c6a58e
    
   | 
 
 Collaboration diagram for pocketmine\network\NetworkSessionManager: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 48 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 109 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 76 of file NetworkSessionManager.php.
| pocketmine\network\NetworkSessionManager::getSessions | ( | ) | 
Definition at line 89 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 84 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 58 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 67 of file NetworkSessionManager.php.
| pocketmine\network\NetworkSessionManager::tick | ( | ) | 
Updates all sessions which need it.
Definition at line 94 of file NetworkSessionManager.php.