This commit is contained in:
as2252258@163.com
2021-07-11 04:45:16 +08:00
parent 6b6801bfcd
commit 1d1196207a
+2
View File
@@ -406,6 +406,8 @@ class Server extends HttpService
$this->onBindCallback($server, 'receive', $config['events'][Event::SERVER_ON_RECEIVE] ?? [make(OnReceive::class), 'onHandler']);
} else if ($config['type'] === self::HTTP) {
$this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']);
$server->on('connect', null);
$server->on('close', null);
} else {
throw new Exception('Unknown server type(' . $config['type'] . ').');
}