This commit is contained in:
esrrhs 2019-10-26 20:45:58 +08:00
parent c90545eaf6
commit 15e53f1f52
3 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/esrrhs/go-engine/src/loggo"
"github.com/esrrhs/pingtunnel"
"strconv"
)
var usage = `
@ -70,6 +71,10 @@ func main() {
flag.Usage()
return
}
if *tcpmode_maxwin*10 > pingtunnel.FRAME_MAX_ID {
fmt.Println("set tcp win to big max = " + strconv.Itoa(pingtunnel.FRAME_MAX_ID/10))
return
}
loggo.Ini(loggo.Config{Level: loggo.LEVEL_DEBUG, Prefix: "pingtunnel", MaxDay: 3})
loggo.Info("start...")

View File

@ -139,5 +139,5 @@ func GetMd5String(s string) string {
const (
FRAME_MAX_SIZE int = 888
FRAME_MAX_ID int = 10000
FRAME_MAX_ID int = 100000
)

View File

@ -75,4 +75,8 @@ func Test0001(t *testing.T) {
fm.recvid = 7
fm.windowsize = 5
fmt.Println("fm.isIdInRange = ", fm.isIdInRange(9, 10))
fm.recvid = 10
fm.windowsize = 10000
fmt.Println("fm.isIdInRange = ", fm.isIdInRange(0, FRAME_MAX_ID))
}