Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
echo-lib-Deprecated
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
echo
echo-lib-Deprecated
Commits
e4a64e1d
Commit
e4a64e1d
authored
Jul 19, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adr startup
parent
1e4d7189
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
.gitignore
.gitignore
+1
-0
build.gradle
build.gradle
+3
-0
EchoClient.java
src/main/java/com/virjar/echo/nat/client/EchoClient.java
+11
-6
No files found.
.gitignore
View file @
e4a64e1d
...
...
@@ -16,3 +16,4 @@ LittleProxy.pro
/bin
*.jks
performance/site/
build/
\ No newline at end of file
build.gradle
View file @
e4a64e1d
...
...
@@ -9,6 +9,9 @@ dependencies {
api
'io.netty:netty-codec:4.0.44.Final'
api
'io.netty:netty-handler:4.0.44.Final'
compileOnly
'org.projectlombok:lombok:1.18.2'
annotationProcessor
'org.projectlombok:lombok:1.18.2'
compileOnly
'org.slf4j:slf4j-api:1.7.25'
compileOnly
'com.google.android:android:4.1.1.4'
compileOnly
'com.android.support:support-annotations:28.0.0'
...
...
src/main/java/com/virjar/echo/nat/client/EchoClient.java
View file @
e4a64e1d
...
...
@@ -5,10 +5,19 @@ import com.virjar.echo.nat.protocol.EchoPacket;
import
com.virjar.echo.nat.protocol.EchoPacketDecoder
;
import
com.virjar.echo.nat.protocol.EchoPacketEncoder
;
import
com.virjar.echo.nat.protocol.PacketCommon
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
import
io.netty.bootstrap.Bootstrap
;
import
io.netty.buffer.ByteBuf
;
import
io.netty.buffer.Unpooled
;
import
io.netty.channel.*
;
import
io.netty.channel.Channel
;
import
io.netty.channel.ChannelFuture
;
import
io.netty.channel.ChannelFutureListener
;
import
io.netty.channel.ChannelHandlerContext
;
import
io.netty.channel.ChannelInitializer
;
import
io.netty.channel.nio.NioEventLoopGroup
;
import
io.netty.channel.socket.SocketChannel
;
import
io.netty.channel.socket.nio.NioSocketChannel
;
...
...
@@ -16,10 +25,6 @@ import io.netty.util.concurrent.DefaultThreadFactory;
import
io.netty.util.concurrent.Future
;
import
io.netty.util.concurrent.GenericFutureListener
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
public
class
EchoClient
{
private
String
natServerHost
;
...
...
@@ -196,7 +201,7 @@ public class EchoClient {
return
;
}
isConnecting
=
true
;
EchoLogger
.
getLogger
().
info
(
"connect to nat server...
"
);
EchoLogger
.
getLogger
().
info
(
"connect to nat server...
-> "
+
natServerHost
+
":"
+
natServerPort
);
echoClientBootstrap
.
connect
(
natServerHost
,
natServerPort
)
.
addListener
(
new
ChannelFutureListener
()
{
...
...
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