- php.ini选项
- swoole.enable_coroutine
- swoole.aio_thread_num
- swoole.display_errors
- swoole.socket_buffer_size
- swoole.fast_serialize
- swoole.use_shortname
- 类名映射关系
php.ini选项
swoole.enable_coroutine
On
, Off
开关内置协程, 默认开启
swoole.aio_thread_num
设置AIO
异步文件读写的线程数量,默认为2
swoole.display_errors
关闭/开启Swoole
错误信息,默认开启
swoole.socket_buffer_size
设置进程间通信的Socket
缓存区尺寸,默认为8M
swoole.fast_serialize
swoole_server中的task功能中是否使用swoole_serialize对异步任务数据序列化
swoole.use_shortname
是否启用短别名。
类名映射关系
下划线类名风格 | 命名空间风格 |
---|---|
swoole_server | Swoole\Server |
swoole_client | Swoole\Client |
swoole_process | Swoole\Process |
swoole_timer | Swoole\Timer |
swoole_table | Swoole\Table |
swoole_lock | Swoole\Lock |
swoole_atomic | Swoole\Atomic |
swoole_buffer | Swoole\Buffer |
swoole_redis | Swoole\Redis |
swoole_event | Swoole\Event |
swoole_mysql | Swoole\MySQL |
swoole_mmap | Swoole\Mmap |
swoole_channel | Swoole\Channel |
swoole_serialize | Swoole\Serialize |
swoole_http_server | Swoole\Http\Server |
swoole_http_client | Swoole\Http\Client |
swoole_http_request | Swoole\Http\Request |
swoole_http_response | Swoole\Http\Response |
swoole_websocket_server | Swoole\WebSocket\Server |
需要swoole-1.8.1或更高版本