Updated dependencies, improved config

* Configuration now key-value map with friendly accessors.
* Configuration file maps 1:1
This commit is contained in:
2024-03-12 00:28:31 +01:00
parent c810876aa4
commit da450b510a
5 changed files with 62 additions and 76 deletions

View File

@ -25,11 +25,13 @@ class Daemon
{
$this->server = new Server($this->config, $this->loop);
$listeners = $this->config->getListeners();
foreach ($listeners as $listener) {
$socket = new SocketServer("tcp://".$listener['address']);
$this->server->listen($socket);
$listenAddress = $this->config->getListenAddress();
if (!$listenAddress) {
fwrite(STDERR, "Warning: Empty listening address. You won't make it far.\n");
return;
}
$socket = new SocketServer("tcp://".$listenAddress);
$this->server->listen($socket);
}
public function stop(): void