From 728c2705b295471e5071639d7da7cdbf2d925dc2 Mon Sep 17 00:00:00 2001 From: esrrhs Date: Sat, 2 Nov 2019 15:50:54 +0800 Subject: [PATCH] add --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 85cd921..dfe73f7 100644 --- a/main.go +++ b/main.go @@ -85,6 +85,10 @@ Usage: -profile 在端口开启性能检测,默认0不开启 open profile on the port, default 0 is off + + -conntt 发起连接动作的超时时间,默认1000ms + the connect call's timeout, default 1000ms + ` func main() { @@ -108,6 +112,7 @@ func main() { max_process_thread := flag.Int("maxprt", 100, "max process thread in server") max_process_buffer := flag.Int("maxprb", 1000, "max process thread's buffer in server") profile := flag.Int("profile", 0, "open profile") + conntt := flag.Int("conntt", 1000, "the connect call's timeout") flag.Usage = func() { fmt.Printf(usage) } @@ -150,7 +155,7 @@ func main() { loggo.Info("key %d", *key) if *t == "server" { - s, err := pingtunnel.NewServer(*key, *maxconn, *max_process_thread, *max_process_buffer) + s, err := pingtunnel.NewServer(*key, *maxconn, *max_process_thread, *max_process_buffer, *conntt) if err != nil { loggo.Error("ERROR: %s", err.Error()) return