/**
* Constructor
*
* @param \React\EventLoop\LoopInterface $loop
*/
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");
}