Mercurial > hg > Applications > TightVNC_orginal
changeset 48:6ebe870da138
this version resolve change host problem.
author | one |
---|---|
date | Tue, 18 Dec 2012 17:56:49 +0900 |
parents | f3b775d3592a |
children | b0c7fad4c695 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/client/EchoClient.java src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java src/viewer_swing/java/com/glavsoft/viewer/TreeConnectionManager.java |
diffstat | 3 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/EchoClient.java Thu Dec 06 17:51:29 2012 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/EchoClient.java Tue Dec 18 17:56:49 2012 +0900 @@ -16,7 +16,7 @@ private Socket clientSocket = null; private int echoPort = 9999; Viewer client; - public String parentAddress; + private String parentAddress; public String parentNum; public String treeNum; public String leaderFlag; @@ -258,4 +258,7 @@ leaderFlag = is.readLine(); return new Socket(tempParentAddress, 5999); } + public String getParentsAddress() { + return parentAddress; + } } \ No newline at end of file
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Thu Dec 06 17:51:29 2012 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Tue Dec 18 17:56:49 2012 +0900 @@ -121,7 +121,7 @@ } else { // getHostData(); } - run(); + run1(); createConnectionAndStart(); getChangeScreenRequest(); // Should be used Client Socket. try { @@ -356,6 +356,7 @@ DataOutputStream os = new DataOutputStream( echoSocket.getOutputStream()); os.writeBytes("reconnection\n"); + System.out.println("port ==== " + port); os.writeBytes(port + "\n"); os.close(); } @@ -371,7 +372,7 @@ newVps.connectionParams.hostName = hostName; if (newVps.run1()) { newVps.createConnectionAndStart(); - newVps.createSocketAndSend(aClient.getList(), String.valueOf(opendPort)); + newVps.createSocketAndSend(aClient.getList(), String.valueOf(newVps.opendPort)); } else { newVps.cleanUpSession(); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/TreeConnectionManager.java Thu Dec 06 17:51:29 2012 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/TreeConnectionManager.java Tue Dec 18 17:56:49 2012 +0900 @@ -45,7 +45,7 @@ rfb.setEcho(echo); rfb.setProxyAddr(getBcast.textAddress()); echo.getParentName(); - connectionParams.hostName = echo.parentAddress; + connectionParams.hostName = echo.getParentsAddress(); connectionParams.portNumber = Integer.parseInt(getBcast.textPort()); // I should get port number // connectionParams.hostName = getBcast.textAddress(); // connectionParams.portNumber = Integer.parseInt(getBcast.textPort());