Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 11:2869ca1579ae
acceptThread
author | e085711 |
---|---|
date | Sat, 16 Apr 2011 20:37:41 +0900 (2011-04-16) |
parents | 2840c7a259f1 |
children | ac847013174d |
files | src/VncCanvas.java src/VncViewer.java |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/VncCanvas.java Sat Apr 16 02:21:09 2011 +0900 +++ b/src/VncCanvas.java Sat Apr 16 20:37:41 2011 +0900 @@ -29,6 +29,8 @@ import java.nio.ByteBuffer; import java.util.zip.*; +import java.net.Socket; + // // VncCanvas is a subclass of Canvas which draws a VNC desktop on it. // @@ -379,6 +381,15 @@ long count = 0; + try { + rfb.initServSock(5550); +// rfb.setSoTimeout(1000); + Socket newCli = rfb.accept(); + rfb.sendInitData(newCli); + rfb.addSock(newCli); + } catch (IOException e) { + } + /* Thread accept = new Thread(new acceptThread(rfb)); accept.start();
--- a/src/VncViewer.java Sat Apr 16 02:21:09 2011 +0900 +++ b/src/VncViewer.java Sat Apr 16 20:37:41 2011 +0900 @@ -447,9 +447,9 @@ rfb.writeClientInit(); rfb.readServerInit(); +/* if (rfb.MYVNC) { rfb.initServSock(5550); - // rfb.setSoTimeout(10); try { Socket newCli = rfb.accept(); @@ -458,8 +458,8 @@ } catch (IOException e) { } - } +*/ System.out.println("Desktop name is " + rfb.desktopName); System.out.println("Desktop size is " + rfb.framebufferWidth + " x "