modify plugin name
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Kiri\Server\Contract;
|
||||
|
||||
use Swoole\Server;
|
||||
|
||||
use Swoole\WebSocket\Server;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,9 +13,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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,17 +2,18 @@
|
||||
|
||||
namespace Kiri\Server\Contract;
|
||||
|
||||
use Swoole\Server;
|
||||
|
||||
use Swoole\WebSocket\Server;
|
||||
|
||||
interface OnDisconnectInterface
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param int $fd
|
||||
*/
|
||||
public function onDisconnect(int $fd): void;
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param int $fd
|
||||
*/
|
||||
public function onDisconnect(Server $server, int $fd): void;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,17 +2,18 @@
|
||||
|
||||
namespace Kiri\Server\Contract;
|
||||
|
||||
use Kiri\Websocket\WebSocketInterface;
|
||||
use Swoole\WebSocket\Frame;
|
||||
use Swoole\WebSocket\Server;
|
||||
|
||||
interface OnMessageInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param Frame $frame
|
||||
* @return void
|
||||
*/
|
||||
public function onMessage(Frame $frame): void;
|
||||
public function onMessage(Server $server, Frame $frame): void;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
namespace Kiri\Server\Contract;
|
||||
|
||||
use Swoole\Http\Request;
|
||||
use Swoole\WebSocket\Server;
|
||||
|
||||
interface OnOpenInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param Request $request
|
||||
* @return void
|
||||
*/
|
||||
public function onOpen(Request $request): void;
|
||||
public function onOpen(Server $server, Request $request): void;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user