This commit is contained in:
2020-09-14 02:45:00 +08:00
parent 1f043c56bd
commit 993d18e961
+11
View File
@@ -12,6 +12,7 @@ use Snowflake\Di\Container;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Process\Process;
use Swoole\Coroutine;
use Swoole\WebSocket\Server;
class Snowflake
{
@@ -195,6 +196,16 @@ class Snowflake
}
/**
* @return Server|\Swoole\Http\Server
* @throws
*/
public static function getWebSocket()
{
return static::app()->get('server')->getServer();
}
/**
* @param string $class
* @param array $params