Updated dependencies, improved config
* Configuration now key-value map with friendly accessors. * Configuration file maps 1:1
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user