Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit e74b4fe

Browse files
authored
Merge pull request #11 from swooletw/develop
Develop
2 parents 76605e9 + cc67ec7 commit e74b4fe

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

config/swoole_http.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
'pid_file' => env('SWOOLE_HTTP_PID_FILE', base_path('storage/logs/swoole_http.pid')),
1919
'log_file' => env('SWOOLE_HTTP_LOG_FILE', base_path('storage/logs/swoole_http.log')),
2020
'daemonize' => env('SWOOLE_HTTP_DAEMONIZE', false),
21+
// Normally this value should be 1~4 times lager according to your cpu cores.
22+
'worker_num' => env('SWOOLE_HTTP_WORKER_NUM', 4),
2123
'task_worker_num' => env('SWOOLE_HTTP_TASK_WORKER_NUM', 4),
24+
// The data to receive can't be larger than buffer_output_size.
25+
'package_max_length' => 10 * 1024 * 1024,
2226
// The data to send can't be larger than buffer_output_size.
2327
'buffer_output_size' => 10 * 1024 * 1024
2428
],
@@ -38,7 +42,7 @@
3842
| Laravel app will be cloned on every requset.
3943
|--------------------------------------------------------------------------
4044
*/
41-
'sandbox_mode' => env('SWOOLE_SANDBOX_MODE', false),
45+
'sandbox_mode' => env('SWOOLE_SANDBOX_MODE', true),
4246

4347
/*
4448
|--------------------------------------------------------------------------

config/swoole_websocket.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/*
55
|--------------------------------------------------------------------------
66
| Websocket handler for onOpen and onClose callback
7-
| Replace this handler before you start it
7+
| Replace this handler if you want to customize your websocket handler
88
|--------------------------------------------------------------------------
99
*/
1010
'handler' => SwooleTW\Http\Websocket\SocketIO\WebsocketHandler::class,
@@ -33,21 +33,21 @@
3333

3434
/*
3535
|--------------------------------------------------------------------------
36-
| Heartbeat interval (ms)
36+
| Websocket client's heartbeat interval (ms)
3737
|--------------------------------------------------------------------------
3838
*/
3939
'ping_interval' => 25000,
4040

4141
/*
4242
|--------------------------------------------------------------------------
43-
| Heartbeat interval timeout (ms)
43+
| Websocket client's heartbeat interval timeout (ms)
4444
|--------------------------------------------------------------------------
4545
*/
4646
'ping_timeout' => 60000,
4747

4848
/*
4949
|--------------------------------------------------------------------------
50-
| Drivers mapping
50+
| Room drivers mapping
5151
|--------------------------------------------------------------------------
5252
*/
5353
'drivers' => [
@@ -57,7 +57,7 @@
5757

5858
/*
5959
|--------------------------------------------------------------------------
60-
| Drivers settings
60+
| Room drivers settings
6161
|--------------------------------------------------------------------------
6262
*/
6363
'settings' => [

0 commit comments

Comments
 (0)