diff --git a/Abstracts/AsyncServer.php b/Abstracts/AsyncServer.php index 6a059b1..e35625a 100644 --- a/Abstracts/AsyncServer.php +++ b/Abstracts/AsyncServer.php @@ -11,6 +11,8 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use ReflectionException; use Swoole\Server; +use Kiri\Server\ServerInterface; +use Kiri\Server\Constant; use Kiri\Events\EventDispatch; use Kiri\Exception\NotFindClassException; use Kiri\Server\Events\OnServerBeforeStart; diff --git a/Config.php b/Config.php index c2490e4..6e26c63 100644 --- a/Config.php +++ b/Config.php @@ -11,22 +11,23 @@ class Config public string $type; - public string $host; + + public string $host = ''; - public int $port; + public int $port = 0; - public string $name; + public string $name = ''; - public int $mode; + public int $mode = SWOOLE_SOCK_TCP; - public array $settings; + public array $settings = []; - public array $events; + public array $events = []; /** * @return string