Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
majora-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
majora
majora-go
Commits
48003a52
Commit
48003a52
authored
Dec 12, 2021
by
wei.xuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:pool
parent
0d7bbb53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
getty.go
client/getty.go
+5
-4
majora-dev.ini
conf/majora-dev.ini
+2
-2
No files found.
client/getty.go
View file @
48003a52
...
...
@@ -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(5
000)
//
)
var
(
taskPool
=
gxsync
.
NewTaskPoolSimple
(
10
000
)
)
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
))
...
...
conf/majora-dev.ini
View file @
48003a52
;
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment