1. Core Configs
1.1 Policies:
Typedef Name | Effect |
---|---|
concurrency_type | Concurrency policy: 并行策略 |
elog_type | Error logger type: 错误日志类型 |
alog_type | Access logger type: 接入日志类型 |
request_type | HTTP request type: HTTP请求类型 |
response_type | HTTP response type: HTTP响应类型 |
message_type | Type to deliver recieved messages: 用于传输接收的消息的类型 |
con_msg_manager_type | Connection level message manager: connection级别消息管理 |
endpoint_msg_manager_type | Endpoint level message manager: endpoint级别消息管理 |
rng_type | Random Number Generation policy: 产生随机数的策略 |
transport_type | Transport policy to use: 使用的传输策略 |
endpoint_base | User overridable Endpoint base class: 用户重载的endpoint基类 |
connection_base | User overridable Connection base class: 用户重载connection基类 |
1.2 Timeouts Values
Field | Type | Default | Operation |
---|---|---|---|
timeout_open_handshake:开启握手超时时长 | long | 5000 | Opening handshake |
timeout_close_handshake: 关闭握手超时时长 | long | 5000 | Closing handshake |
timeout_pong: 等待pong超时时长 | long | 5000 | No pong recieved after ping |
1.3 Performance Tuning
Field | Type | Default | Meaning |
---|---|---|---|
connection_read_buffer_size | size_t | 16384 | Size of the per-connection read buffer:每个连接的缓冲区 |
enable_multithreading | bool | true | Disabling may reduce locking overhead for single threaded programs: 关闭能够避免多线程锁 |
1.4 Security settings
Field | Type | Default | Effect |
---|---|---|---|
drop_on_protocol_error | bool | false | Omit close handshake on protocol error:协议错误时不发送关闭握手消息 |
silent_close | bool | false | Don't return close codes or reasons: 关闭时不返回错误码和原因 |
max_message_size | size_t | 32MB | WebSocket max message size limit: 最大消息大小 |
max_http_body_size | size_t | 32MB | HTTP Parser's max body size limit: 最大http消息大小 |
2. Transport Config Options
2.1 Policies
Typedef Name | Effect |
---|---|
concurrency_type | Concurrency Policy: 并行策略 |
elog_type | Error logger type: 错误日志类型 |
alog_type | Access logger type: 接入日志类型 |
request_type | HTTP request type: HTTP请求类型 |
response_type | HTTP response typ: HTTP响应类型 |
2.2 Timeouts Values
Field | Type | Default | Operation |
---|---|---|---|
timeout_socket_pre_init | long | 5000 | Transport dependent: TCP三次握手超时 |
timeout_proxy | long | 5000 | Proxy handshake: 网关超时 |
timeout_socket_post_init | long | 5000 | Transport dependent (commonly: TLS handshake): TLS握手超时 |
timeout_dns_resolve | long | 5000 | DNS resolution: DNS 超时 |
timeout_connect | long | 5000 | TCP Connect: 连接超时 |
timeout_socket_shutdown | long | 5000 | Socket shutdown: 套接字关闭超时 |
2.3 Performance tuning
Field | Type | Default | Meaning |
---|---|---|---|
enable_multithreading | bool | true | Disabling may reduce locking overhead for single threaded programs: 关闭时能够避免加锁消耗 |
来源:oschina
链接:https://my.oschina.net/u/4407552/blog/3233046