1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| <?php
return [ 'http' => [ 'enable' => true, 'host' => '0.0.0.0', 'port' => 9501, 'worker_num' => swoole_cpu_num(), 'options' => [ 'package_max_length' => 10 * 1024 * 1024, 'max_request' => 3000, ], ],
'websocket' => [ 'enable' => true, 'route' => false, 'handler' => \think\swoole\websocket\Handler::class, 'ping_interval' => 25000, 'ping_timeout' => 60000, 'room' => [ 'type' => 'table', 'table' => [ 'room_rows' => 8192, 'room_size' => 2048, 'client_rows' => 4096, 'client_size' => 2048, ], ],
'listen' => [ 'open' => \app\webscoket\Connect::class, 'event' => \app\webscoket\Event::class, 'close' => \app\webscoket\Close::class, ],
'subscribe' => [], ],
'rpc' => [ 'server' => [ 'enable' => false, 'host' => '0.0.0.0', 'port' => 9000, 'worker_num' => swoole_cpu_num(), 'services' => [], ], 'client' => [], ],
'queue' => [ 'enable' => false, 'workers' => [], ],
'hot_update' => [ 'enable' => env('APP_DEBUG', false), 'name' => ['*.php'], 'include' => [app_path()], 'exclude' => [], ],
'pool' => [ 'db' => [ 'enable' => true, 'max_active' => 3, 'max_wait_time' => 5, ], 'cache' => [ 'enable' => true, 'max_active' => 3, 'max_wait_time' => 5, ], ],
'ipc' => [ 'type' => 'unix_socket', ],
'lock' => [ 'enable' => false, 'type' => 'table', ],
'tables' => [], 'concretes' => [], 'resetters' => [], 'instances' => [], 'services' => [], ];
|