Definition at line 30 of file ServerSession.php.
◆ __construct()
raklib\server\ServerSession::__construct |
( |
Server | $server, |
|
|
\Logger | $logger, |
|
|
InternetAddress | $address, |
|
|
int | $clientId, |
|
|
int | $mtuSize, |
|
|
int | $internalId, |
|
|
int | $recvMaxSplitParts = self::DEFAULT_MAX_SPLIT_PART_COUNT, |
|
|
int | $recvMaxConcurrentSplits = self::DEFAULT_MAX_CONCURRENT_SPLIT_COUNT ) |
◆ addEncapsulatedToQueue()
raklib\generic\Session::addEncapsulatedToQueue |
( |
EncapsulatedPacket | $packet, |
|
|
bool | $immediate ) |
|
inherited |
◆ forciblyDisconnect()
raklib\generic\Session::forciblyDisconnect |
( |
int | $reason | ) |
|
|
inherited |
Disconnects the session with immediate effect, regardless of current session state. Usually used in timeout cases.
- Parameters
-
int | $reason | one of the DisconnectReason constants @phpstan-param DisconnectReason::* $reason |
- See also
- DisconnectReason
Definition at line 316 of file Session.php.
◆ getAddress()
raklib\generic\Session::getAddress |
( |
| ) |
|
|
inherited |
◆ getID()
raklib\generic\Session::getID |
( |
| ) |
|
|
inherited |
◆ getInternalId()
raklib\server\ServerSession::getInternalId |
( |
| ) |
|
Returns an ID used to identify this session across threads.
Definition at line 55 of file ServerSession.php.
◆ getRakNetTimeMS()
raklib\generic\Session::getRakNetTimeMS |
( |
| ) |
|
|
protectedinherited |
Returns a monotonically increasing timestamp. It does not need to match UNIX time. This is used to calculate ping.
Definition at line 154 of file Session.php.
◆ getState()
raklib\generic\Session::getState |
( |
| ) |
|
|
inherited |
◆ handlePacket()
raklib\generic\Session::handlePacket |
( |
Packet | $packet | ) |
|
|
inherited |
◆ handleRakNetConnectionPacket()
raklib\server\ServerSession::handleRakNetConnectionPacket |
( |
string | $packet | ) |
|
|
finalprotected |
Called when a packet is received while the session is in the "connecting" state. This should only handle RakNet connection packets. Any other packets should be ignored.
Reimplemented from raklib\generic\Session.
Definition at line 71 of file ServerSession.php.
◆ initiateDisconnect()
raklib\generic\Session::initiateDisconnect |
( |
int | $reason | ) |
|
|
inherited |
Initiates a graceful asynchronous disconnect which ensures both parties got all packets.
- Parameters
-
int | $reason | one of the DisconnectReason constants @phpstan-param DisconnectReason::* $reason |
- See also
- DisconnectReason
Definition at line 299 of file Session.php.
◆ isConnected()
raklib\generic\Session::isConnected |
( |
| ) |
|
|
inherited |
◆ isFullyDisconnected()
raklib\generic\Session::isFullyDisconnected |
( |
| ) |
|
|
inherited |
Returns whether the session is ready to be destroyed (either properly cleaned up or forcibly terminated)
Definition at line 339 of file Session.php.
◆ isTemporary()
raklib\generic\Session::isTemporary |
( |
| ) |
|
|
inherited |
◆ onDisconnect()
raklib\server\ServerSession::onDisconnect |
( |
int | $reason | ) |
|
|
protected |
Called when the session is terminated for any reason.
- Parameters
-
int | $reason | one of the DisconnectReason::* constants @phpstan-param DisconnectReason::* $reason |
- See also
- DisconnectReason
Reimplemented from raklib\generic\Session.
Definition at line 67 of file ServerSession.php.
◆ onPacketAck()
raklib\server\ServerSession::onPacketAck |
( |
int | $identifierACK | ) |
|
|
protected |
◆ onPacketReceive()
raklib\server\ServerSession::onPacketReceive |
( |
string | $packet | ) |
|
|
protected |
Called when a user packet (ID >= ID_USER_PACKET_ENUM) is received from the remote peer.
- See also
- MessageIdentifiers::ID_USER_PACKET_ENUM
Reimplemented from raklib\generic\Session.
Definition at line 96 of file ServerSession.php.
◆ onPingMeasure()
raklib\server\ServerSession::onPingMeasure |
( |
int | $pingMS | ) |
|
|
protected |
◆ queueConnectedPacket()
raklib\generic\Session::queueConnectedPacket |
( |
ConnectedPacket | $packet, |
|
|
int | $reliability, |
|
|
int | $orderChannel, |
|
|
bool | $immediate = false ) |
|
protectedinherited |
◆ sendPacket()
raklib\server\ServerSession::sendPacket |
( |
Packet | $packet | ) |
|
|
finalprotected |
◆ sendPing()
raklib\generic\Session::sendPing |
( |
int | $reliability = PacketReliability::UNRELIABLE | ) |
|
|
protectedinherited |
◆ update()
raklib\generic\Session::update |
( |
float | $time | ) |
|
|
inherited |
◆ $address
◆ $state
int raklib\generic\Session::$state = self::STATE_CONNECTING |
|
protectedinherited |
◆ DEFAULT_MAX_CONCURRENT_SPLIT_COUNT
const raklib\server\ServerSession::DEFAULT_MAX_CONCURRENT_SPLIT_COUNT = 4 |
◆ DEFAULT_MAX_SPLIT_PART_COUNT
const raklib\server\ServerSession::DEFAULT_MAX_SPLIT_PART_COUNT = 128 |
◆ MIN_MTU_SIZE
const raklib\generic\Session::MIN_MTU_SIZE = 400 |
|
inherited |
◆ STATE_CONNECTED
const raklib\generic\Session::STATE_CONNECTED = 1 |
|
inherited |
◆ STATE_CONNECTING
const raklib\generic\Session::STATE_CONNECTING = 0 |
|
inherited |
◆ STATE_DISCONNECT_NOTIFIED
const raklib\generic\Session::STATE_DISCONNECT_NOTIFIED = 3 |
|
inherited |
◆ STATE_DISCONNECT_PENDING
const raklib\generic\Session::STATE_DISCONNECT_PENDING = 2 |
|
inherited |
◆ STATE_DISCONNECTED
const raklib\generic\Session::STATE_DISCONNECTED = 4 |
|
inherited |
The documentation for this class was generated from the following file: