diff --git a/HttpServer/Http/Request.php b/HttpServer/Http/Request.php index 3d4683fb..71853bb9 100644 --- a/HttpServer/Http/Request.php +++ b/HttpServer/Http/Request.php @@ -89,7 +89,7 @@ class Request extends Application } $server = Snowflake::app()->getSwoole(); - return $server->connection_info($this->fd); + return $server->getClientInfo($this->fd); } diff --git a/HttpServer/IInterface/AuthIdentity.php b/HttpServer/IInterface/AuthIdentity.php index 950965b7..b7a5e0e0 100644 --- a/HttpServer/IInterface/AuthIdentity.php +++ b/HttpServer/IInterface/AuthIdentity.php @@ -13,7 +13,13 @@ interface AuthIdentity { - public function getIdentity(); + + /** + * @return string|int + * 获取唯一识别码 + */ + public function getUniqueId(): string|int; + }