改名
This commit is contained in:
@@ -228,6 +228,7 @@ class Request extends HttpService
|
||||
return current($this->explode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -237,18 +238,6 @@ class Request extends HttpService
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function adapter(): void
|
||||
{
|
||||
if (!$this->isHead()) {
|
||||
router()->dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
|
||||
@@ -337,14 +337,13 @@ class ServerManager extends Abstracts\Server
|
||||
$reflect = $this->getNewInstance(WebSocketServerListener::class);
|
||||
$this->server->on('handshake', [$reflect, 'onHandshake']);
|
||||
$this->server->on('message', [$reflect, 'onMessage']);
|
||||
$this->server->on('close', [$reflect, 'onClose']);
|
||||
$this->server->on('disconnect', [$reflect, 'onDisconnect']);
|
||||
$this->server->on('connect', [$reflect, 'onConnect']);
|
||||
|
||||
$reflect->setEvents(Constant::HANDSHAKE, $settings['events'][Constant::HANDSHAKE] ?? null);
|
||||
$reflect->setEvents(Constant::DISCONNECT, $settings['events'][Constant::DISCONNECT] ?? null);
|
||||
$reflect->setEvents(Constant::MESSAGE, $settings['events'][Constant::MESSAGE] ?? null);
|
||||
$reflect->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
||||
$reflect->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
||||
|
||||
$this->addCloseOrDisconnect($reflect, $settings);
|
||||
} else if ($type === Constant::SERVER_TYPE_UDP) {
|
||||
$reflect = $this->getNewInstance(UDPServerListener::class);
|
||||
$this->server->on('packet', [$reflect, 'onPacket']);
|
||||
|
||||
Reference in New Issue
Block a user