|
|
@ -102,13 +102,8 @@ public class ProxyClientContainer implements Container, ChannelStatusListener { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void connectProxyServer() { |
|
|
|
private void connectProxyServer() { |
|
|
|
|
|
|
|
bootstrap.connect(config.getStringValue("server.host"), config.getIntValue("server.port")).addListener((ChannelFuture future)->{ |
|
|
|
bootstrap.connect(config.getStringValue("server.host"), config.getIntValue("server.port")).addListener(new ChannelFutureListener() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void operationComplete(ChannelFuture future) throws Exception { |
|
|
|
|
|
|
|
if (future.isSuccess()){ |
|
|
|
if (future.isSuccess()){ |
|
|
|
|
|
|
|
|
|
|
|
// 连接成功,向服务器发送客户端认证信息(clientKey)
|
|
|
|
// 连接成功,向服务器发送客户端认证信息(clientKey)
|
|
|
|
ClientChannelMannager.setCmdChannel(future.channel()); |
|
|
|
ClientChannelMannager.setCmdChannel(future.channel()); |
|
|
|
ProxyMessage proxyMessage = new ProxyMessage(); |
|
|
|
ProxyMessage proxyMessage = new ProxyMessage(); |
|
|
@ -124,7 +119,6 @@ public class ProxyClientContainer implements Container, ChannelStatusListener { |
|
|
|
reconnectWait(); |
|
|
|
reconnectWait(); |
|
|
|
connectProxyServer(); |
|
|
|
connectProxyServer(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|