• 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_serverSwoole\Server
    swoole_clientSwoole\Client
    swoole_processSwoole\Process
    swoole_timerSwoole\Timer
    swoole_tableSwoole\Table
    swoole_lockSwoole\Lock
    swoole_atomicSwoole\Atomic
    swoole_bufferSwoole\Buffer
    swoole_redisSwoole\Redis
    swoole_eventSwoole\Event
    swoole_mysqlSwoole\MySQL
    swoole_mmapSwoole\Mmap
    swoole_channelSwoole\Channel
    swoole_serializeSwoole\Serialize
    swoole_http_serverSwoole\Http\Server
    swoole_http_clientSwoole\Http\Client
    swoole_http_requestSwoole\Http\Request
    swoole_http_responseSwoole\Http\Response
    swoole_websocket_serverSwoole\WebSocket\Server
    需要swoole-1.8.1或更高版本