From fdc05fbbc12fa97aa38eeff15729d782cb9cc01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 8 Feb 2021 17:03:37 +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 --- HttpServer/Http/Request.php | 2 +- HttpServer/IInterface/AuthIdentity.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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; + }