src/Leevel/Protocol/Server.php
public function onTask(SwooleServer $server, int $taskId, int $fromId, string $data): void
    {
        $this->log(
            sprintf(
                'Task %d form workder %d, the result is %s',
                $taskId, $fromId, $data
            )
        );

        $server->finish($data);
    }
public function onTask(SwooleServer $server, int $taskId, int $fromId, string $data): void
    {
        $this->log(
            sprintf(
                'Task %d form workder %d, the result is %s',
                $taskId, $fromId, $data
            )
        );

        $server->finish($data);
    }
监听连接 task 事件.

@param \Swoole\Server $server
@param int            $taskId
@param int            $fromId
@param string         $data

@see https://wiki.swoole.com/wiki/page/134.html