2022-06-16 17:38:22 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Kiri\Server;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Swoole\Server;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @mixin Server
|
|
|
|
|
*/
|
|
|
|
|
interface ServerInterface
|
|
|
|
|
{
|
|
|
|
|
|
2022-06-20 17:25:01 +08:00
|
|
|
/**
|
|
|
|
|
* @param array $service
|
|
|
|
|
* @param int $daemon
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function initCoreServers(array $service, int $daemon = 0): void;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Config $config
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function addListener(Config $config): void;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function start(): void;
|
2022-06-16 17:38:22 +08:00
|
|
|
|
|
|
|
|
}
|