Mercurial > hg > Applications > TreeVNC
changeset 151:43b4281cf27d
do not create new socket in connect parent.
author | oc |
---|---|
date | Fri, 13 Jun 2014 17:00:04 +0900 |
parents | 925fb2090282 |
children | 4096a8408fdb |
files | src/main/java/jp/ac/u_ryukyu/treevnc/AcceptThread.java src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java |
diffstat | 2 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/AcceptThread.java Fri Jun 13 13:21:10 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/AcceptThread.java Fri Jun 13 17:00:04 2014 +0900 @@ -28,7 +28,7 @@ InputStream is = newCli.getInputStream(); rfb.newClient(this, newCli, new Writer(os), new Reader(is)); } catch (Exception e) { - // logger + System.out.println("failed to connect incoming client" + e.getMessage()); } } }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 13 13:21:10 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 13 17:00:04 2014 +0900 @@ -125,11 +125,9 @@ public void connectToParenet(int port, String hostname, boolean leader) throws IOException { this.leaderFlag = leader; - Socket socket = new Socket(hostname,port); - socket.setReuseAddress(true); client.setTeminationType(true); client.closeApp(); - client.setSocket(socket); + client.setConnectionParam(hostname, port); SwingUtilities.invokeLater(client); // client.run(); }