fix protocol name

This commit is contained in:
yggverse 2024-05-04 21:53:45 +03:00
parent 9bb15c4bec
commit 46d1cb55ef
4 changed files with 17 additions and 15 deletions

View file

@ -4,7 +4,7 @@ namespace Yggverse\Pulsar\Controller\Server;
use \Ratchet\MessageComponentInterface;
class Nps implements MessageComponentInterface
class Nex implements MessageComponentInterface
{
private object $_config;
@ -15,7 +15,7 @@ class Nps implements MessageComponentInterface
\Yggverse\Pulsar\Model\Database $database
) {
// Init config
$this->_config = $config->get()->server->nps;
$this->_config = $config->get()->server->nex;
// Init database
$this->_database = $database;

View file

@ -26,15 +26,15 @@ $database = new \Yggverse\Pulsar\Model\Database(
// Start server
switch ($environment->get('protocol'))
{
case 'nps'|'NPS':
case 'nex':
$server = \Ratchet\Server\IoServer::factory(
new \Yggverse\Pulsar\Controller\Server\Nps(
new \Yggverse\Pulsar\Controller\Server\Nex(
$config,
$database
),
$config->get()->server->nps->port,
$config->get()->server->nps->host
$config->get()->server->nex->port,
$config->get()->server->nex->host
);
$server->run();