You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
// Copyright 2022, Chef. All rights reserved.
|
|
|
|
|
// https://github.com/q191201771/lal
|
|
|
|
|
//
|
|
|
|
|
// Use of this source code is governed by a MIT-style license
|
|
|
|
|
// that can be found in the License file.
|
|
|
|
|
//
|
|
|
|
|
// Author: Chef (191201771@qq.com)
|
|
|
|
|
|
|
|
|
|
package logic
|
|
|
|
|
|
|
|
|
|
import "github.com/q191201771/naza/pkg/nazalog"
|
|
|
|
|
|
|
|
|
|
var Log = nazalog.GetGlobalLogger()
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
relayPushTimeoutMs = 5000
|
|
|
|
|
relayPushWriteAvTimeoutMs = 5000
|
|
|
|
|
relayPullTimeoutMs = 5000
|
|
|
|
|
relayPullReadAvTimeoutMs = 5000
|
|
|
|
|
calcSessionStatIntervalSec uint32 = 5
|
|
|
|
|
|
|
|
|
|
// checkSessionAliveIntervalSec
|
|
|
|
|
//
|
|
|
|
|
// - 对于输入型session,检查一定时间内,是否没有收到数据
|
|
|
|
|
// - 对于输出型session,检查一定时间内,是否没有发送数据
|
|
|
|
|
// 注意,这里既检查socket发送阻塞,又检查上层没有给session喂数据
|
|
|
|
|
//
|
|
|
|
|
checkSessionAliveIntervalSec uint32 = 10
|
|
|
|
|
)
|