网络连接重连次数修改
parent
809c477d8e
commit
2844fb94a3
|
|
@ -15,17 +15,17 @@ function Network.New(type, socket)
|
|||
|
||||
instance.resendTimes = 0 --记录消息重发次数
|
||||
instance.sendFlag = false --监听收到消息的标记,发送时标记为true,收到消息则标记为false
|
||||
instance.maxResendTimes = 3 --最大重发次数,超过该时间则取消发送
|
||||
instance.maxResendTimes = 4 --最大重发次数,超过该时间则取消发送
|
||||
instance.sendWaitTime = 0 --记录消息等待时间(秒)
|
||||
instance.maxSendWaitTime = 5 --消息重发等待时间(秒),超过该时间会重发消息
|
||||
instance.maxSendWaitTime = 10 --消息重发等待时间(秒),超过该时间会重发消息
|
||||
instance.sendFunc = nil --请求缓存
|
||||
instance.sendFuncQueue = Queue.New() --请求缓存列表,当一帧发送多个请求时,缓存等待上一个请求收到回调时,执行下一个请求
|
||||
|
||||
instance.re_resendTimes = 0 --记录断线重发次数
|
||||
instance.reconnectFlag = false --记录断线重连标记
|
||||
instance.re_maxResendTimes = 2 --最大断线重发次数,超过该时间则取消发送
|
||||
instance.re_maxResendTimes = 3 --最大断线重发次数,超过该时间则取消发送
|
||||
instance.re_sendWaitTime = 0 --记录断线等待时间(秒)
|
||||
instance.re_maxSendWaitTime = 5 --消息断线重发等待时间(秒),超过该时间会重连
|
||||
instance.re_maxSendWaitTime = 6 --消息断线重发等待时间(秒),超过该时间会重连
|
||||
|
||||
instance.ReconnectTime=0 -- 重连的发生时间
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue