跳至主要內容

Class: init_config<CT>

muzzik大约 1 分钟

index / network / base_ / init_config

Class: init_config<CT>

network.base_.init_config

初始化配置

Type parameters

NameType
CTextends codec_base = codec_base

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new init_config<CT>(init_?)

Type parameters

NameType
CTextends codec_base = codec_base

Parameters

NameType
init_?Partial<init_config<CT>>

Defined in

assets/@framework/network/mk_network_base.ts:632open in new window

Properties

codec

Optional codec: CT

编解码器

Defined in

assets/@framework/network/mk_network_base.ts:637open in new window


send_interval_ms_n

send_interval_ms_n: number = 0

发送间隔

Remarks

单位:毫秒

Defined in

assets/@framework/network/mk_network_base.ts:643open in new window


reconnect_interval_ms_n

reconnect_interval_ms_n: number = 1000

重连间隔

Remarks

单位:毫秒

Defined in

assets/@framework/network/mk_network_base.ts:649open in new window


max_reconnect_n

max_reconnect_n: number = 5

最大重连次数

Defined in

assets/@framework/network/mk_network_base.ts:651open in new window


wait_timeout_ms_n

wait_timeout_ms_n: number = 5000

等待消息超时时间

Remarks

单位:毫秒

Defined in

assets/@framework/network/mk_network_base.ts:657open in new window


heartbeat_config

Optional heartbeat_config: Object

心跳配置

Type declaration

NameTypeDescription
interval_ms_n?number发送间隔 Remarks 单位:毫秒
timeout_ms_nnumber超时时间 Remarks 单位:毫秒
init_f(done_f: () => void) => null | () => any初始化

Defined in

assets/@framework/network/mk_network_base.ts:659open in new window

Methods

parse_message_id_f

parse_message_id_f(data): string | number

解析消息 id

Parameters

NameTypeDescription
dataany接收的消息

Returns

string | number

消息号

Defined in

assets/@framework/network/mk_network_base.ts:685open in new window


parse_message_sequence_f

parse_message_sequence_f(data): undefined | string | number

解析消息序列号

Parameters

NameTypeDescription
dataany接收的消息

Returns

undefined | string | number

消息序列号

Defined in

assets/@framework/network/mk_network_base.ts:694open in new window

📣 觉得很赞?分享给你的朋友吧!