RakLib sync n.2

This commit is contained in:
Dylan K. Taylor 2020-12-12 19:54:17 +00:00
parent 5f4ef84d52
commit eaf6e19a6f
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 11 additions and 11 deletions

8
composer.lock generated
View File

@ -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",

View File

@ -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);
}