Files
fscan/core/host_batch.go
T

22 lines
446 B
Go
Raw Normal View History

2026-06-01 02:50:49 +08:00
package core
import (
"github.com/shadow1ng/fscan/common"
"github.com/shadow1ng/fscan/common/parsers"
)
const maxHostBatchSize = 65536
func targetHostBatchSize(config *common.Config) int {
size := parsers.DefaultHostBatchSize
if config != nil && config.ThreadNum > 0 {
threadWindow := config.ThreadNum * 8
if threadWindow > size {
size = threadWindow
}
}
if size > maxHostBatchSize {
return maxHostBatchSize
}
return size
}