配置选项 [编辑本页]

swoole_server::set函数用于设置swoole_server运行时的各项参数。本节所有的子页面均为配置数组的元素。

示例:

$serv->set(array(
    'worker_num' => 4,    //worker process num
    'backlog' => 128,   //listen backlog
    'max_request' => 50,
    'dispatch_mode'=>1, 
));