mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 11:27:30 +08:00
Initial commit
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use Adapterman\Adapterman;
|
||||
use Workerman\Worker;
|
||||
Adapterman::init();
|
||||
|
||||
$http_worker = new Worker('http://127.0.0.1:7010');
|
||||
$http_worker->count = swoole_cpu_num() ?? 2;
|
||||
$http_worker->name = 'AdapterMan';
|
||||
|
||||
$http_worker->onWorkerStart = static function () {
|
||||
//init();
|
||||
require __DIR__.'/start.php';
|
||||
};
|
||||
|
||||
$http_worker->onMessage = static function ($connection, $request) {
|
||||
|
||||
$connection->send(run());
|
||||
};
|
||||
|
||||
Worker::runAll();
|
||||
Reference in New Issue
Block a user