Network: Added config to pocketmine.yml to allow changing max MTU size

This might be useful for people with older routers where the connection MTU is actually lower than the router allows.
This commit is contained in:
Dylan K. Taylor
2018-01-18 18:15:14 +00:00
parent 1e67360048
commit 0c868b16b6
4 changed files with 17 additions and 7 deletions

View File

@ -65,7 +65,14 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
public function __construct(Server $server){
$this->server = $server;
$this->rakLib = new RakLibServer($this->server->getLogger(), \pocketmine\COMPOSER_AUTOLOADER_PATH, $this->server->getPort(), $this->server->getIp() === "" ? "0.0.0.0" : $this->server->getIp(), false);
$this->rakLib = new RakLibServer(
$this->server->getLogger(),
\pocketmine\COMPOSER_AUTOLOADER_PATH,
$this->server->getPort(),
$this->server->getIp() === "" ? "0.0.0.0" : $this->server->getIp(),
false,
(int) $this->server->getProperty("network.max-mtu-size", 1492)
);
$this->interface = new ServerHandler($this->rakLib, $this);
}