2022-01-09 03:49:02 +08:00
|
|
|
<?php
|
|
|
|
|
|
2022-01-10 11:39:55 +08:00
|
|
|
namespace Kiri\Server\Contract;
|
2022-01-09 03:49:02 +08:00
|
|
|
|
|
|
|
|
use Swoole\Server;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
interface OnReceiveInterface
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Server $server
|
|
|
|
|
* @param int $fd
|
|
|
|
|
* @param int $reactor_id
|
|
|
|
|
* @param string $data
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2022-09-23 18:55:45 +08:00
|
|
|
public function onReceive(Server $server, int $fd, int $reactor_id, string $data): bool;
|
2022-01-09 03:49:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|