Class: init_config<CT>
index / network / base_ / init_config
Class: init_config<CT>
初始化配置
Type parameters
Name | Type |
---|---|
CT | extends codec_base = codec_base |
Hierarchy
init_config
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new init_config<CT
>(init_?
)
Type parameters
Name | Type |
---|---|
CT | extends codec_base = codec_base |
Parameters
Name | Type |
---|---|
init_? | Partial <init_config <CT >> |
Defined in
assets/@framework/network/mk_network_base.ts:632
Properties
codec
• Optional
codec: CT
编解码器
Defined in
assets/@framework/network/mk_network_base.ts:637
send_interval_ms_n
• send_interval_ms_n: number
= 0
发送间隔
Remarks
单位:毫秒
Defined in
assets/@framework/network/mk_network_base.ts:643
reconnect_interval_ms_n
• reconnect_interval_ms_n: number
= 1000
重连间隔
Remarks
单位:毫秒
Defined in
assets/@framework/network/mk_network_base.ts:649
max_reconnect_n
• max_reconnect_n: number
= 5
最大重连次数
Defined in
assets/@framework/network/mk_network_base.ts:651
wait_timeout_ms_n
• wait_timeout_ms_n: number
= 5000
等待消息超时时间
Remarks
单位:毫秒
Defined in
assets/@framework/network/mk_network_base.ts:657
heartbeat_config
• Optional
heartbeat_config: Object
心跳配置
Type declaration
Name | Type | Description |
---|---|---|
interval_ms_n? | number | 发送间隔 Remarks 单位:毫秒 |
timeout_ms_n | number | 超时时间 Remarks 单位:毫秒 |
init_f | (done_f : () => void ) => null | () => any | 初始化 |
Defined in
assets/@framework/network/mk_network_base.ts:659
Methods
parse_message_id_f
▸ parse_message_id_f(data
): string
| number
解析消息 id
Parameters
Name | Type | Description |
---|---|---|
data | any | 接收的消息 |
Returns
string
| number
消息号
Defined in
assets/@framework/network/mk_network_base.ts:685
parse_message_sequence_f
▸ parse_message_sequence_f(data
): undefined
| string
| number
解析消息序列号
Parameters
Name | Type | Description |
---|---|---|
data | any | 接收的消息 |
Returns
undefined
| string
| number
消息序列号