Thruway\Peer\Router::__construct PHP Method

__construct() public method

Constructor
public __construct ( React\EventLoop\LoopInterface $loop = null )
$loop React\EventLoop\LoopInterface
    public function __construct(LoopInterface $loop = null)
    {
        Utils::checkPrecision();
        $this->loop = $loop ?: Factory::create();
        $this->realmManager = new RealmManager();
        $this->eventDispatcher = new EventDispatcher();
        $this->eventDispatcher->addSubscriber($this);
        $this->registerModule($this->realmManager);
        Logger::debug($this, "New router created");
    }