改名
This commit is contained in:
@@ -392,21 +392,6 @@ class ServerManager extends Abstracts\Server
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $reflect
|
|
||||||
* @param $settings
|
|
||||||
*/
|
|
||||||
private function addCloseOrDisconnect($reflect, $settings): void
|
|
||||||
{
|
|
||||||
if (swoole_version() >= '4.7') {
|
|
||||||
$reflect->setEvents(Constant::DISCONNECT, $settings['events'][Constant::DISCONNECT] ?? null);
|
|
||||||
$this->server->on('disconnect', [$reflect, 'onDisconnect']);
|
|
||||||
}
|
|
||||||
$reflect->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
|
||||||
$this->server->on('close', [$reflect, 'onClose']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $events
|
* @param array $events
|
||||||
* @throws NotFindClassException
|
* @throws NotFindClassException
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ class WebSocketServerListener extends Abstracts\Server
|
|||||||
* @param int $mode
|
* @param int $mode
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @return Server\Port
|
* @return Server\Port
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user