Mercurial > hg > Applications > TreeVNC
changeset 127:cc1fcdc7657c
find root continue.
author | oc |
---|---|
date | Fri, 06 Jun 2014 19:49:47 +0900 |
parents | 775ce6a14f89 |
children | 0cf1541f69bb |
files | src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java src/main/java/jp/ac/u_ryukyu/treevnc/client/GetHostClient.java src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java |
diffstat | 3 files changed, 3 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Fri Jun 06 19:17:32 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Fri Jun 06 19:49:47 2014 +0900 @@ -20,7 +20,7 @@ } public void findTreeVncRoot() { - GetHostClient getBcast = new GetHostClient(ConnectionParams.DEFAULT_VNC_ROOT_FINDER); + GetHostClient getBcast = new GetHostClient(rfb.acceptPort); getBcast.getHost(); portNumber = 0; do {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/GetHostClient.java Fri Jun 06 19:17:32 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/GetHostClient.java Fri Jun 06 19:49:47 2014 +0900 @@ -39,17 +39,7 @@ port = _port; } - public void createSocket() { - do { - try { - server = new ServerSocket(port); - } catch (BindException e){ - port ++; - } catch (IOException e) { - // can't open socket - } - } while (server == null); - + public void createSocket() { try { mAddr = InetAddress.getByName(GetBroadCastProxy.McastAddr); soc = new MulticastSocket();
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 06 19:17:32 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 06 19:49:47 2014 +0900 @@ -24,19 +24,12 @@ public String parentNum; public String treeNum; public String leaderFlag; - private String myAddress; - private int rootPort; - + private String myAddress; public TreeVncProtocol(String name, int echoPort) { this.echoPort = echoPort; this.proxyName = name; } - - public void setRootPort(int port) { - rootPort = port; - } - public void openport() { try { @@ -79,7 +72,6 @@ throws IOException { int savePort = echoPort; - echoPort = rootPort; openport(); ByteBuffer buf = ByteBuffer.allocate(4+4+4+hostname.length());