mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
RakLib sync n.2
This commit is contained in:
parent
5f4ef84d52
commit
eaf6e19a6f
8
composer.lock
generated
8
composer.lock
generated
@ -637,12 +637,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/RakLib.git",
|
||||
"reference": "4272f15bc47941b59e1d597ca544465f4a59725e"
|
||||
"reference": "31e513ee53adf8e32cabad072a50f8572f6dfb12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/4272f15bc47941b59e1d597ca544465f4a59725e",
|
||||
"reference": "4272f15bc47941b59e1d597ca544465f4a59725e",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/31e513ee53adf8e32cabad072a50f8572f6dfb12",
|
||||
"reference": "31e513ee53adf8e32cabad072a50f8572f6dfb12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -672,7 +672,7 @@
|
||||
"issues": "https://github.com/pmmp/RakLib/issues",
|
||||
"source": "https://github.com/pmmp/RakLib/tree/master"
|
||||
},
|
||||
"time": "2020-12-12T02:09:57+00:00"
|
||||
"time": "2020-12-12T19:33:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/snooze",
|
||||
|
@ -138,7 +138,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
}
|
||||
}
|
||||
|
||||
public function closeSession(int $sessionId, string $reason) : void{
|
||||
public function onClientDisconnect(int $sessionId, string $reason) : void{
|
||||
if(isset($this->sessions[$sessionId])){
|
||||
$session = $this->sessions[$sessionId];
|
||||
unset($this->sessions[$sessionId]);
|
||||
@ -158,7 +158,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$this->rakLib->quit();
|
||||
}
|
||||
|
||||
public function openSession(int $sessionId, string $address, int $port, int $clientID) : void{
|
||||
public function onClientConnect(int $sessionId, string $address, int $port, int $clientID) : void{
|
||||
$session = new NetworkSession(
|
||||
$this->server,
|
||||
$this->network->getSessionManager(),
|
||||
@ -172,7 +172,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$this->sessions[$sessionId] = $session;
|
||||
}
|
||||
|
||||
public function handleEncapsulated(int $sessionId, string $packet) : void{
|
||||
public function onPacketReceive(int $sessionId, string $packet) : void{
|
||||
if(isset($this->sessions[$sessionId])){
|
||||
if($packet === "" or $packet[0] !== self::MCPE_RAKNET_PACKET_ID){
|
||||
return;
|
||||
@ -208,7 +208,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$this->interface->unblockAddress($address);
|
||||
}
|
||||
|
||||
public function handleRaw(string $address, int $port, string $payload) : void{
|
||||
public function onRawPacketReceive(string $address, int $port, string $payload) : void{
|
||||
$this->network->processRawPacket($this, $address, $port, $payload);
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$this->interface->addRawPacketFilter($regex);
|
||||
}
|
||||
|
||||
public function notifyACK(int $sessionId, int $identifierACK) : void{
|
||||
public function onPacketAck(int $sessionId, int $identifierACK) : void{
|
||||
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$this->interface->setPacketsPerTickLimit($limit);
|
||||
}
|
||||
|
||||
public function handleBandwidthStats(int $bytesSentDiff, int $bytesReceivedDiff) : void{
|
||||
public function onBandwidthStatsUpdate(int $bytesSentDiff, int $bytesReceivedDiff) : void{
|
||||
$this->network->getBandwidthTracker()->add($bytesSentDiff, $bytesReceivedDiff);
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
}
|
||||
}
|
||||
|
||||
public function updatePing(int $sessionId, int $pingMS) : void{
|
||||
public function onPingMeasure(int $sessionId, int $pingMS) : void{
|
||||
if(isset($this->sessions[$sessionId])){
|
||||
$this->sessions[$sessionId]->updatePing($pingMS);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user