Mercurial > hg > Members > nobuyasu > tightVNCProxy
diff src/RfbProto.java @ 2:498393e502bf
change Socket -> ServerSocket
author | e085711 |
---|---|
date | Wed, 13 Apr 2011 07:37:37 +0900 |
parents | cbe9c4ac0369 |
children | 10dbc0e61adf |
line wrap: on
line diff
--- a/src/RfbProto.java Tue Apr 12 14:39:00 2011 +0900 +++ b/src/RfbProto.java Wed Apr 13 07:37:37 2011 +0900 @@ -28,6 +28,7 @@ import java.awt.*; import java.awt.event.*; import java.net.Socket; +import java.net.ServerSocket; import java.util.zip.*; import java.nio.*; @@ -173,11 +174,11 @@ private long numBytesRead = 0; public long getNumBytesRead() { return numBytesRead; } - boolean TEST=false; + boolean MYVNC=true; Socket cliSock; ByteBuffer buffer; int rnBytes; - + // Java on UNIX does not call keyPressed() on some keys, for example // swedish keys To prevent our workaround to produce duplicate @@ -234,9 +235,9 @@ if (viewer.socketFactory == null) { sock = new Socket(host, port); - if(TEST){ -// cliSock = new Socket("localhost",5550); - cliSock = new Socket("dimolto.cr.ie.u-ryukyu.ac.jp",5550); + if(MYVNC){ + ServerSocket serverSock = new ServerSocket(5550); + cliSock = serverSock.accept(); } } else {