发布于 2015-08-09 09:41:20 | 744 次阅读 | 评论: 0 | 来源: 网络整理
swoole_server::set函数用于设置swoole_server运行时的各项参数。本节所有的子页面均为配置数组的元素。
示例:
$serv->set(array(
'worker_num' => 4, //worker process num
'backlog' => 128, //listen backlog
'max_request' => 50,
'dispatch_mode'=>1,
));
reactor_num
worker_num
max_request
max_conn (max_connection)
task_worker_num
task_ipc_mode
task_max_request
task_tmpdir
dispatch_mode
message_queue_key
daemonize
backlog
log_file
heartbeat_check_interval
heartbeat_idle_time
open_eof_check
open_eof_split
package_eof
open_length_check
package_length_type
package_max_length
open_cpu_affinity
cpu_affinity_ignore
open_tcp_nodelay
tcp_defer_accept
ssl_cert_file
user
group
chroot
pipe_buffer_size
buffer_output_size
enable_unsafe_event
discard_timeout_request