From eb4cc76eee7634dff27288ed23923828a0f281f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 21 Apr 2023 23:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contract/OnCloseInterface.php | 5 ++++- Contract/OnDisconnectInterface.php | 18 ++++++++++++++++++ Contract/OnHandshakeInterface.php | 19 +++++++++++++++++++ Contract/OnOpenInterface.php | 19 +++++++++++++++++++ Contract/OnPacketInterface.php | 2 +- 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 Contract/OnDisconnectInterface.php create mode 100644 Contract/OnHandshakeInterface.php create mode 100644 Contract/OnOpenInterface.php diff --git a/Contract/OnCloseInterface.php b/Contract/OnCloseInterface.php index 94c8fe7..6c011f2 100644 --- a/Contract/OnCloseInterface.php +++ b/Contract/OnCloseInterface.php @@ -2,6 +2,8 @@ namespace Kiri\Server\Contract; +use Swoole\Server; + /** * */ @@ -10,10 +12,11 @@ interface OnCloseInterface /** + * @param Server $server * @param int $fd * @return void */ - public function OnClose(int $fd): void; + public function onClose(Server $server, int $fd): void; } diff --git a/Contract/OnDisconnectInterface.php b/Contract/OnDisconnectInterface.php new file mode 100644 index 0000000..e08f743 --- /dev/null +++ b/Contract/OnDisconnectInterface.php @@ -0,0 +1,18 @@ +