mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 09:49:50 +00:00
NetworkSession: added getHandler() and setHandler(), SessionHandler->setUp() now not useless
This commit is contained in:
parent
08621604cd
commit
e16f20affa
@ -60,7 +60,7 @@ class NetworkSession{
|
|||||||
$this->ip = $ip;
|
$this->ip = $ip;
|
||||||
$this->port = $port;
|
$this->port = $port;
|
||||||
|
|
||||||
$this->handler = new SimpleSessionHandler($player);
|
$this->setHandler(new SimpleSessionHandler($player));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInterface() : NetworkInterface{
|
public function getInterface() : NetworkInterface{
|
||||||
@ -81,6 +81,15 @@ class NetworkSession{
|
|||||||
return $this->port;
|
return $this->port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getHandler() : SessionHandler{
|
||||||
|
return $this->handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHandler(SessionHandler $handler) : void{
|
||||||
|
$this->handler = $handler;
|
||||||
|
$this->handler->setUp();
|
||||||
|
}
|
||||||
|
|
||||||
public function handleEncoded(string $payload) : void{
|
public function handleEncoded(string $payload) : void{
|
||||||
//TODO: decryption if enabled
|
//TODO: decryption if enabled
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user