This commit is contained in:
Administrator
2022-12-01 10:19:48 +08:00
parent 7d90fa17bd
commit 45c369a0a1
7 changed files with 66 additions and 39 deletions
@@ -3,6 +3,7 @@ package org.kne.cloud.network.klalb;
import java.io.DataInputStream;
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.Collection;
import java.util.Collections;
@@ -65,13 +66,13 @@ public class KLALBServer {
UUID uid=new UUID(din.readLong(),din.readLong());
System.out.println("隧道连接:"+tll);
System.out.println(new IPPort((InetSocketAddress)s.getRemoteSocketAddress())+"->"+tll.getIpport()+"->"+eas.ipport);
IOThreadManager nx = null;
if(whm.containsKey(uid)) {
nx=whm.get(uid);
}else {
nx=new IOThreadManager();
Socket soc=new Socket("192.168.1.233",eas.ipport.getPort());
Socket soc=new Socket(eas.ipport.getIp(),eas.ipport.getPort());
nx.setLocal(new TCPConnection(null, soc));
nx.startLocal();
whm.put(uid, nx);