public function start()
{
$callbacks = array_merge(['Start' => [$this, 'onServerStart'], 'Shutdown' => [$this, 'onServerShutdown'], 'WorkerStart' => [$this, 'onWorkerStart'], 'Request' => [$this, 'onRequest']], $this->callbacks);
if (isset($this->wrapper_config['swoole_ontask'])) {
$callbacks['Task'] = $this->wrapper_config['swoole_ontask'];
$callbacks['Finish'] = $this->wrapper_config['swoole_onfinish'];
}
foreach ($callbacks as $on => $method) {
$this->server->on($on, $method);
}
$this->server->start();
}