Commit 48003a52 authored by wei.xuan's avatar wei.xuan

add:pool

parent 0d7bbb53
......@@ -7,14 +7,15 @@ import (
"time"
"github.com/adamweixuan/getty"
gxsync "github.com/adamweixuan/gostnops/sync"
"virjar.com/majora-go/common"
"virjar.com/majora-go/infra"
"virjar.com/majora-go/log"
)
//var (
//taskPool = gxsync.NewTaskPoolSimple(5000)
//)
var (
taskPool = gxsync.NewTaskPoolSimple(10000)
)
func (client *Client) connect() {
hostPort := client.config.TunnelAddr
......@@ -27,7 +28,7 @@ func (client *Client) connect() {
gettyCli := getty.NewTCPClient(
getty.WithServerAddress(hostPort),
getty.WithConnectionNumber(1),
//getty.WithClientTaskPool(taskPool),
getty.WithClientTaskPool(taskPool),
getty.WithReconnectInterval(int(reConnect.Milliseconds())),
getty.WithLocalAddressClient(client.localAddr))
gettyCli.RunEventLoop(NewClientSession(client))
......
;tunnel_addr = 127.0.0.1:5879
tunnel_addr = aoba.vip:5879
tunnel_addr = 127.0.0.1:5879
;tunnel_addr = aoba.vip:5879
dns_server = 114.114.114.114:53
;bind to local ip
;local_ip = 192.168.0.100
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment