mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
NetworkSession: added getHandler() and setHandler(), SessionHandler->setUp() now not useless
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user