Mercurial > hg > Applications > TreeVNC
changeset 162:33c7a08c90e7
Update root accept port in node list after selectPort
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 16 Jun 2014 21:55:51 +0900 |
parents | e997deb54314 |
children | c850c2fce039 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java Mon Jun 16 20:09:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java Mon Jun 16 21:55:51 2014 +0900 @@ -28,5 +28,9 @@ return port; } + public void setPort(int acceptPort) { + port = acceptPort; + } + }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Mon Jun 16 20:09:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Mon Jun 16 21:55:51 2014 +0900 @@ -72,7 +72,7 @@ private void initRoot(String hostName) { myRfb = new MyRfbProtoProxy(); myRfb.setVncProxy(this); - clients = new TreeManagement(hostName, vncport,myRfb); + clients = new TreeManagement(hostName, ConnectionParams.DEFAULT_VNC_ROOT,myRfb); isApplet = false; setIsTreeVNC(true); setConnectionParam(hostName,vncport); @@ -103,6 +103,9 @@ */ public void createConnectionAndStart() { myRfb.selectPort(ConnectionParams.DEFAULT_VNC_ROOT); + if (clients!=null) { + clients.getList().getFirst().setPort(myRfb.getAcceptPort()); + } acceptThread = new TreeVncCommandChannelListener(myRfb, myRfb.getAcceptPort()); Thread thread = new Thread(acceptThread, "TreeVNC-accept"); thread.start();