From 62c4f995b90edc6bd7f8db8bd726f2b9929fd65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 31 Mar 2021 18:19:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/function.php b/function.php index 5438d7e4..073fa246 100644 --- a/function.php +++ b/function.php @@ -23,6 +23,7 @@ use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; use HttpServer\Http\Context; use Snowflake\Core\ArrayAccess; +use Swoole\WebSocket\Server; if (!function_exists('make')) { @@ -81,6 +82,22 @@ if (!function_exists('annotation')) { } + +if (!function_exists('swoole')) { + + + /** + * @throws Exception + */ + function swoole(): Swoole\Server|Server + { + return Snowflake::getWebSocket(); + } + + +} + + if (!function_exists('recursive_directory')) {